Paul O. Seidon
unread,Dec 22, 2014, 12:10:07 PM12/22/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cython...@googlegroups.com
Hi all,
I suddenly experience difficulties using Cython (ver. 0.21.1 on Arch Linux,
Python 2.7.9) by the simple
import pyximport; pyximport.install()
It executes properly several times (several pyx modules are imported this
way), but then in
import pyximport
pyximport.install()
import object_finder_strategies_cy
the execution of "import object_finder_strategies_cy" (which is a pyx file)
causes the execution of
raise TypeError, "dist must be a Distribution instance"
in the __init__ method of class Command.
The sequence in question is
# late import because of mutual dependence between these classes
from distutils.dist import Distribution
if not isinstance(dist, Distribution):
raise TypeError, "dist must be a Distribution instance"
if self.__class__ is Command:
raise RuntimeError, "Command is an abstract class"
Looking at dist reveals that it is an instance of
distutils.dist.Distribution. But Distribution (the 2nd arg in
isinstance(dist, Distribution)) suddenly is setuptools.dist.Distribution
instead of distutils.dist.Distribution as it has been in the other imports.
Can anyone shed some light on this? How do I overcome this problem?
Cheers
Paul