[Distutils] ImportError running 'test' on namespace package - other package in namespace not found

Jason R. Coombs jaraco at jaraco.com
Thu Jun 19 04:07:57 CEST 2008


I've got two projects:  mynamespace.myprojectA and mynamespace.myprojectB
myprojectB depends on myprojectA.  I'm using setuptools 0.6c8 to manage both
projects.
Both projects are registered using 'setup develop'.  Both projects are
accessible from an interactive interpreter:

PS C:\Users\me\projects> python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mynamespace.myprojectA
>>> import mynamespace.myprojectB
>>> from mynamespace.myprojectA import mymoduleZ

However, when I run 'setup test' in myprojectB, the tests fail with

    File ".mymoduleZ.py", line NNN, in [some context]
        from mynamespace.myprojectA.mymoduleZ import MyClassC
    ImportError: No module named myprojectA.mymoduleZ

In setup.py, the test_suite is nose.collector.

I searched and couldn't find anyone else with this problem.  Is this a
supported configuration?  Is there something I can do to make tests work
with interdependent projects with the same root namespace?

If there's not something obvious I should be doing differently, I'm happy to
put together a minimal test case that reproduces the problem.  Any
suggestions are appreciated.

Sincerely,
Jason R. Coombs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6580 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080618/588ec28a/attachment.bin>


More information about the Distutils-SIG mailing list