[Distutils] Installing namespace packages with pip inserts strange modules into sys.modules

Fred Drake fred at fdrake.net
Fri Sep 12 21:44:12 CEST 2014


On Fri, Sep 12, 2014 at 3:34 PM, Thomas Heller <theller at ctypes.org> wrote:
> However, when installing it in Python 3.4, this __init__.py file is NOT
> installed. Instead, the 'zope' directory ONLY contains the 'interface'
> subdirectory with all the code.  But a .pth file is installed that does
> the strange things that I mentioned in the original post.

The horrible .pth file in question definitely comes from setuptools.

At Zope Corp., we consistently use zc.buildout to package applications,
which drives setuptools with some long option whose name I forget that
causes the .pth files to be suppressed, and entry-point-based scripts are
generated with the right bits to assemble the sys.path needed for the
application.

For what it's worth.


  -Fred

-- 
Fred L. Drake, Jr.    <fred at fdrake.net>
"A storm broke loose in my mind."  --Albert Einstein


More information about the Distutils-SIG mailing list