[Distutils] requiring python 2.5
Phillip J. Eby
pje at telecommunity.com
Fri Jun 15 20:57:17 CEST 2007
At 12:59 PM 6/15/2007 -0500, Rick Ratzel wrote:
> Yes, I see now that it does get imported, but unfortunately not
> by my code.
>It's imported as a result of importing pkg_resources, since
>enthought.traits is
>a namespace package.
Does it *need* to be a namespace package?
> Grasping at straws, I set enthought.__path__ in enstaller-script.py
>immediately before and after pkg_resources is imported, only to get the same
>results both times.
>
> But when I switch to setuptools 0.7 there are no enthought.traits modules
>loaded at all (in fact, the only enthought. modules loaded are the enstaller
>ones)...this must have been one of the changes you mentioned.
Yes, that's exactly the change I'm talking about; in 0.7, namespace
packages are always loaded lazily.
> Phillip, I really appreciate the time you're taking to look at this. I'm
>going to release a version which simply requires setuptools 0.7...unless you
>think that's a terrible idea, or you discover that I'm doing something wrong
>that I can fix.
The only things I can think of would be removing traits as a
namespace package, or manually setting its __path__ also. That is,
first set enthought.__path__, then
enthought.traits.__path__. However, this will only work right if no
traits.__init__ module does anything but declare the namespace.
More information about the Distutils-SIG
mailing list