[Distutils] Namespace packages and egg-info confusion when using bdist_rpm

Stanley A. Klein sklein at cpcug.org
Fri Aug 10 00:52:36 CEST 2007

On Thu, August 9, 2007 4:02 pm, Ryan May wrote:
>> On Thu, July 26, 2007 2:01 pm, Phillip J. Eby wrote:
>>> At 01:37 PM 7/26/2007 -0400, Stanley A. Klein wrote:
>>>> I had the same error.  Should I have put in an "import enthought" in
>>>> all
>>>> the others?
>>> No, apparently the manual import doesn't help.  Presumably the ones
>>> you changed need something more like this:
>>> import enthought; enthought.traits = sys.modules['enthought.traits']
>>> import enthought.traits; enthought.traits.ui =
>>> sys.modules['enthought.traits.ui']
>>> I thought the import would be sufficient, but apparently it's not.  :(
>>> Again, let me know if it works so I can change setuptools accordingly.
> This solution worked for me initially, but now I'm getting warnings when
> I run any python script I get:
> warning: Not importing directory
> '/usr/lib64/python2.5/site-packages/enthought/traits': missing __init__.py
> warning: Not importing directory
> '/usr/lib64/python2.5/site-packages/enthought/traits/ui': missing
> __init__.py
> This is when I added the above lines to the .pth files for both traits
> and traits.ui.  What am I doing wrong?
> Thanks,

With traits and traits.ui, you have to fix the pth file for all three
namespace packages.  Most of the others only have one namespace package

BTW, there is now a totally crazy error I get when trying to do bdist_rpm
on kiva.  If I do "python setup.py build", it works properly.  If I do
"python setup.py bdist_rpm" it gives a traceback on the build step that
uses (or can be made to use) the same command that worked when run alone,
but now complains that it can't fine agg_wrap.c, which doesn't exist (the
file is agg_wrap.cpp).

Stan Klein

More information about the Distutils-SIG mailing list