[Distutils] Bad tracebacks from packages installed using setuptools

Andreas Klöckner lists at informa.tiker.net
Mon May 12 18:16:19 CEST 2008

Hi there,

I'm getting tracebacks like this from a package (pymbolic in this 
case--available from PyPI) installed using setuptools.

8< -----------------------------------------------------------------------------
  File "build/bdist.linux-x86_64/egg/pymbolic/primitives.py", line 150, in 
  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 17, in 
  File "build/bdist.linux-x86_64/egg/pymbolic/mapper/stringifier.py", line 75, 
in map_product
  File "build/bdist.linux-x86_64/egg/pymbolic/mapper/stringifier.py", line 75, 
in <genexpr>
  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 58, in rec
  File "build/bdist.linux-x86_64/egg/pymbolic/mapper/stringifier.py", line 23, 
in handle_unsupported_expression
8< -----------------------------------------------------------------------------

At least two things are bad here:

- Some source files refer to their relative location in the build directory of 
their *own* package. Unsurprisingly, this is not found when an exception 
occurs in user code that does not live in the package's base directory.

- Whenever a file name is __init__.py, the PIL __init__.py gets picked up 
instead of the corect file name. (nothing uses PIL in what generated the 

What can I do to fix this? (setuptools 0.6c8 on 2.5)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080512/5ae6c29e/attachment.pgp>

More information about the Distutils-SIG mailing list