My n00bie brain hurts after "Python setup.py install".

B

bsagert

I downloaded Mark Pilgrims's feedparser.py in a zipfile to my Windows
machine, unzipped it and tried to install it to no avail.

Here is the result =>

C:\>python c:\scripts\feedparser-4.1\setup.py install
running install
running build
running build_py
file feedparser.py (for module feedparser) not found
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules
to install
running install_egg_info
Writing C:\Python25\Lib\site-packages\feedparser-4.1-py2.5.egg-info

WTF? The file feedparser.py did exist in the same place as setup.py.
Even if it works, what exactly does this setup.py do for me? If I just
manually place feedparser.py in my Python site-packages file it works
fine. As for that egg-info file, I googled "python eggs" and now I am
really confused.
 
J

John Machin

I downloaded Mark Pilgrims's feedparser.py in a zipfile to my Windows
machine, unzipped it and tried to install it to no avail.

Here is the result =>

C:\>python c:\scripts\feedparser-4.1\setup.py install

The convention is to run setup.py from the current directory, unless
instructed otherwise; what did the package's readme say? Try:

cd \scripts\feedparser-4.1
python setup.py install
running install
running build
running build_py
file feedparser.py (for module feedparser) not found
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules
to install
running install_egg_info
Writing C:\Python25\Lib\site-packages\feedparser-4.1-py2.5.egg-info

WTF? The file feedparser.py did exist in the same place as setup.py.
Even if it works, what exactly does this setup.py do for me? If I just
manually place feedparser.py in my Python site-packages file it works
fine.

In general, a setup.py install may do lots of things besides coping 1
file. Manually placing files in site-packages is not a good habit to
get into.
As for that egg-info file, I googled "python eggs" and now I am
really confused.

Eggs are part of a new experimental package distribution scheme. Don't
worry about it.

Cheers,
John
 
J

John Nagle

Eggs are part of a new experimental package distribution scheme. Don't
worry about it.

Yes. "Eggs" are connected to an "easy install" system which has
an annoying tendency to either fail or silently do the wrong thing.
They were an attempt to apply the "packaging" mania of Java to Python.
Fortunately, ".egg" files are actually ".zip" files, so you can
rename them, unpack them, and get at the good parts.

John Nagle
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top