[Distutils] Distutils has no module named util, or is it a package problem?

Ian Bicking ianb at colorstudy.com
Fri Nov 11 00:17:09 CET 2005

Phillip J. Eby wrote:
> At 04:23 PM 11/10/2005 -0600, Ian Bicking wrote:
>> The sandbox in this case is when setuptools runs setup.py with fake 
>> file routines, to see if the setup.py file writes things to weird 
>> locations.  Now that I think about it, this isn't for zip-safe 
>> testing, but to test if setuptools can properly wrap this.
>> I can understand why to do this when running a distutils setup.py 
>> file, but could this be surpressed for a setup.py file which imports 
>> from setuptools?  I think it should be presumed that it is safe in 
>> that case.
> This is a red herring.  Just because a package uses setuptools, doesn't 
> mean it's safe.  The author might have simply taken an older script and 
> changed it to import setuptools.  That doesn't fix any issues like 
> custom data installation commands, or code in the body of setup.py does 
> any installation.

Yes, it is a red herring.  After putting some print statements in my 
setup.py file, I realized that the problem is namespace packages.  When 
I "import paste" it is importing another namespace package (PasteWebKit, 
but I don't know why that one specifically).

I'm guessing the module is loaded because it is an egg, and provides an 
entry point, and entry points are being scanned.  Or maybe just because 
it is a namespace package, and I don't understand how they work.  Well, 
I do understand that they cause me constant problems, and it seems like 
namespace packages that aren't installed multi-version are highly 

I'm not sure exactly how to do this, except maybe to put paste/util on 
the path itself.  I suppose that would work well enough.

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Distutils-SIG mailing list