[Distutils] namespace package doesn't get its __init__.py file if --single-version-externally-managed

Phillip J. Eby pje at telecommunity.com
Tue Oct 2 03:50:39 CEST 2007


At 03:02 PM 10/1/2007 -0600, zooko wrote:
>The full version is here:
>
>https://bugs.launchpad.net/zope3/+bug/146373
>
>The short version is that if you run ./setup.py install --single-
>version-externally-managed from the zope.interface 3.4.0 source tree,
>you'll get everything you need to import zope.interface except for
>the "zope/__init__.py" file.
>
>Is this a bug in setuptools?

--single-version-externally-managed is intended for installation in 
site-packages, especially by system packages.  It thus *cannot* 
install the __init__.py without conflicting with other system 
packages that include code that's part of the same namespace 
package.  Thus, it installs a .pth file to work around the absence of 
the __init__.py

Unfortunately, this doesn't work if you install to a location that 
doesn't support .pth files.  If you are installing to a PYTHONPATH 
directory, you need to install setuptools' special 'site.py' to make 
that directory function in the same way that site-packages does.

Please remember that --single-version-externally-managed option is 
intended primarily for the benefit of system packaging 
tools.  Routine or even manual use is not recommended, because it's 
not manageable without some kind of management tool.  Hence the 
phrase, "externally managed".  :)



More information about the Distutils-SIG mailing list