Dependency search can't handle relative imports

Bug #616002 reported by Kevin Mehall on 2010-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-distutils-extra
Undecided
Unassigned

Bug Description

Using the relative import syntax e.g. "from .. import xyz" in a source file causes the following traceback in setup.py. This is on Ubuntu 10.04 and the source tree is a Quickly project.

Traceback (most recent call last):
  File "setup.py", line 105, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 94, in setup
    __requires(attrs, src_all)
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 391, in __requires
    __add_imports(imports, s, attrs)
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 340, in __add_imports
    if __external_mod(node.modname, attrs):
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 316, in __external_mod
    path = __import__(module).__file__
ValueError: Empty module name

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers