<div>Hello:</div><div><br></div><div>I&#39;m working on the new pip release and have a few questions revolving around __pycache__, distutils, and distribute/setuptools</div><div>Hopefully some people here can increase my understanding on this.</div>
<div>btw, here&#39;s the specific pip issue this relates to:  <a href="https://github.com/pypa/pip/issues/638">https://github.com/pypa/pip/issues/638</a></div><div><br></div><div>I&#39;ve read thru PEP3147, so I have a basic understanding of the various import cases that it describes.</div>
<div><br></div><div>using py3.2.2, pip1.1 and distribute-0.6.27...</div><div><br></div><div>I want to confirm that all of the following are expected, normal and actually ok?</div><div>I need to establish a baseline for the behaviors I should be working against.</div>
<div><br></div><div>1) after installing distutils distributions or setuptools distributions, I see inline *.pyc files (no __pycache__)</div><div><br></div><div>2) after importing one of the newly installed modules, I see the __pycache__ folder appear with a new compiled file,</div>
<div>  but the old inline pyc file for the module still remains</div><div><br></div><div>3) when using --record with --single-version-externally-managed with a setup.py using &quot;setuptools&quot;,</div><div>  I&#39;m finding that what get&#39;s used to generate the bytecode filenames is `setuptools.command.install_lib._bytecode_filenames`.</div>
<div>  This was a little surprising given that --single-version-externally-managed forces the use of &#39;distutils.command.install&#39;, so</div><div>  I was at first expecting `distutils.command.install_lib._bytecode_filenames` to be used.</div>
<div>  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.</div><div><br></div><div>4) Both `distutils.command.install_lib._bytecode_filenames` and `setuptools.command.install_lib._bytecode_filenames` just generate inline *.pyc[o] filenames.</div>
<div><br></div><div>I&#39;ve seen this, <a href="http://bugs.python.org/issue11254">http://bugs.python.org/issue11254</a>, but I&#39;m not clear on the whole story.</div><div><br></div><div>Thanks in advance for any help,</div>
<div>Marcus</div>