easy_install of module produces un-importable result

V

Val

I've written my first module, "gpsparser" 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?

Thanks,

Val
 
D

Diez B. Roggisch

Val said:
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
 
V

Val

Val schrieb:> I've written my first module, "

" and uploaded it as an egg to




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

You are absolutely right. How embarrassing. Thank you SO much!

-Val
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top