[Distutils] py32, distutils, and __pycache__
Marcus Smith
qwcode at gmail.com
Fri Aug 17 02:21:16 CEST 2012
Hello:
I'm working on the new pip release and have a few questions revolving
around __pycache__, distutils, and distribute/setuptools
Hopefully some people here can increase my understanding on this.
btw, here's the specific pip issue this relates to:
https://github.com/pypa/pip/issues/638
I've read thru PEP3147, so I have a basic understanding of the various
import cases that it describes.
using py3.2.2, pip1.1 and distribute-0.6.27...
I want to confirm that all of the following are expected, normal and
actually ok?
I need to establish a baseline for the behaviors I should be working
against.
1) after installing distutils distributions or setuptools distributions, I
see inline *.pyc files (no __pycache__)
2) after importing one of the newly installed modules, I see the
__pycache__ folder appear with a new compiled file,
but the old inline pyc file for the module still remains
3) when using --record with --single-version-externally-managed with a
setup.py using "setuptools",
I'm finding that what get's used to generate the bytecode filenames is
`setuptools.command.install_lib._bytecode_filenames`.
This was a little surprising given that
--single-version-externally-managed forces the use of
'distutils.command.install', so
I was at first expecting
`distutils.command.install_lib._bytecode_filenames` to be used.
I think `distutils.cmd.Command.get_sub_commands()` is responsible for the
use of `setuptools.command.install_lib` over
`distutils.command.install_lib` in this case.
4) Both `distutils.command.install_lib._bytecode_filenames` and
`setuptools.command.install_lib._bytecode_filenames` just generate inline
*.pyc[o] filenames.
I've seen this, http://bugs.python.org/issue11254, but I'm not clear on the
whole story.
Thanks in advance for any help,
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120816/3546abd7/attachment.html>
More information about the Distutils-SIG
mailing list