[Distutils] Problem importing pylirc egg

Philippe Normand philippe at fluendo.com
Mon Apr 24 21:30:04 CEST 2006


Le 24/4/2006, "Phillip J. Eby" <pje at telecommunity.com> a écrit:
>
>Try "import pylircmodule" - it looks like this may be a bug in building
>compressed eggs; if an extension module in a zipfile ends with 'module',
>the bdist_egg command probably isn't stripping the word 'module' from the
>loader name.
>
>If that works, try reinstalling the egg using -Z (or --always-unzip), and
>see if you can just use "import pylirc".  In that case, it is indeed a bug
>in bdist_egg.
>

Gotcha ! :)

I tried importing pylircmodule:

>>> import pylircmodule
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "build/bdist.linux-i686/egg/pylircmodule.py", line 7, in ?
  File "build/bdist.linux-i686/egg/pylircmodule.py", line 6, in
__bootstrap__
ImportError: dynamic module does not define init function
(initpylircmodule)

Re-installed the Egg as you advised, renammed pylircmodule.py to
pylirc.py:

>>> import pylirc
>>> pylirc.__file__
'/home/phil/lib/python2.4/pylirc-0.0.5-py2.4-linux-i686.egg/pylircmodule.so'

So it seems to be a bug ;)
Philippe


More information about the Distutils-SIG mailing list