[Python-Dev] PEP 376 - Open questions

Tarek Ziadé ziade.tarek at gmail.com
Tue Jul 7 23:21:23 CEST 2009


2009/7/7 Paul Moore <p.f.moore at gmail.com>:
>
> The RECORD file should contain precisely those files that are created
> as part of the install. That's ultimately the point of the file (for
> ownership queries and uninstallation).
>
> Hmm, on the other hand, if foo.py is in the RECORD file, the
> uninstaller should uninstall foo.pyc and foo.pyo as well. And a query
> as to whether the distribution owns foo.pyc should return True. How
> will this be handled?

It's planned to list them as well in RECORD, since install calls a sub
command that build thems (install_lib),
So the same rules apply than the .py ones.

But there's a special case : if the --no-compile or the --no-optimize
option is used, then the pyc|pyo files are not
added. Which means they will be created afterwards when the module is
used on the target system.

So the pyc|pyo files could be removed when they are present besides
the py file that is being removed.

Although, it will still be required to write them in the RECORD file
by the install command when the
--no-compile or the --no-optimize options are *not* used.  So they are
properly detected and removed
when the py files are not distributed in binary distributions, but
just pyc files.


More information about the Python-Dev mailing list