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

Phillip J. Eby pje at telecommunity.com
Fri Nov 11 00:26:34 CET 2005


At 05:17 PM 11/10/2005 -0600, Ian Bicking wrote:
>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 problematic.

I personally try to never import a package from within the package's setup 
script.  It's way too likely to have weird results, even without namespace 
packages being involved.

However, if you want to make the package being installed become part of the 
appropriate namespace package(s), you can use:

     pkg_resources.fixup_namespace_packages(source_dir)

in order to tell pkg_resources that source_dir may contain package snippets 
relevant to already-declared namespace packages.  See pkg_resources.txt for 
details.



More information about the Distutils-SIG mailing list