easy_install of module produces un-importable result
Diez B. Roggisch
deets at nospam.web.de
Mon Dec 8 14:57:31 EST 2008
Val schrieb:
> I've written my first module, "
" and uploaded it as an egg to
> PyPI. I can use easy_istall to install my own module, but when I try
> to import it I get an ImportError "No module named gpsparser".
>
> So I've done some research and found that in my site-packages/
> directory gpsparser exists as an egg file, while all the other
> packages I've installed exist as an egg directory.
>
> If this makes any sense, can anyone explain what I've done wrong in
> building my package that the installation process does not unpack the
> egg file?
This has nothing to do with that - it's simply that your egg is empty.
Take a look at this:
(gpsparser)mac-dir:Application Support deets$ unzip -l
/Users/deets/.virtualenvs/gpsparser/lib/python2.5/site-packages/gpsparser-0.0.1-py2.5.egg
Archive:
/Users/deets/.virtualenvs/gpsparser/lib/python2.5/site-packages/gpsparser-0.0.1-py2.5.egg
Length Date Time Name
-------- ---- ---- ----
1 12-08-08 12:04 EGG-INFO/dependency_links.txt
249 12-08-08 12:04 EGG-INFO/PKG-INFO
599 12-08-08 12:04 EGG-INFO/SOURCES.txt
1 12-08-08 12:04 EGG-INFO/top_level.txt
1 12-08-08 11:25 EGG-INFO/zip-safe
-------- -------
851 5 files
(gpsparser)mac-dir:Application Support deets$
I presume you miss a
packages=find_packages(),
line in your setup.py, with
from setuptools import setup, find_packages
to actually get the find_packages.
Diez
More information about the Python-list
mailing list