[Distutils] How to make an egg easy_installable ?
David Cournapeau
david at ar.media.kyoto-u.ac.jp
Fri Jan 25 07:27:38 CET 2008
Hi,
I wanted to make an egg from my package, so that people install it
with easy_install. I managed to make an egg, which works fine, but I
have problems with the cheeseshop, and how easy_install retrieve the egg.
First, I uploaded the egg using register and upload command, and I
can see the egg on the cheeseshop. But when trying to use easy_install,
it does not work: it tries to look for packages in at the URL I gave in
url argument, and do not take the egg from the cheeseshop.
As a temporary "fix", I removed url and url_download arguments, and
re-upload my package: this time, easy_install get the egg, but fails
installing it:
Creating /usr/media/misc/local/lib/python2.5/site-packages/site.py
Searching for numscons
Reading http://cheeseshop.python.org/pypi/numscons/
Reading http://cheeseshop.python.org/pypi/numscons/0.3.1
Best match: numscons 0.3.1
Downloading
http://pypi.python.org/packages/2.5/n/numscons/numscons-0.3.1-py2.5.egg#md5=081b0cfc46d0571b85020a289c7b3c2d
Processing numscons-0.3.1-py2.5.egg
creating
/usr/media/misc/local/lib/python2.5/site-packages/numscons-0.3.1-py2.5.egg
Extracting numscons-0.3.1-py2.5.egg to
/usr/media/misc/local/lib/python2.5/site-packages
Traceback (most recent call last):
File "/usr/bin/easy_install", line 8, in <module>
load_entry_point('setuptools==0.6c6', 'console_scripts',
'easy_install')()
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 1670, in main
with_ei_usage(lambda:
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 1659, in with_ei_usage
return f()
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 1674, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "distutils/core.py", line 151, in setup
File "distutils/dist.py", line 974, in run_commands
File "distutils/dist.py", line 994, in run_command
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 211, in run
self.easy_install(spec, not self.no_deps)
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 471, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 619, in install_eggs
return [self.install_egg(dist_filename, tmpdir)]
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 696, in install_egg
return self.egg_distribution(destination)
File
"/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py",
line 661, in egg_distribution
metadata = EggMetadata(zipimport.zipimporter(egg_path))
zipimport.ZipImportError: not a Zip file
And at this point, I am lost :)
cheers,
David
More information about the Distutils-SIG
mailing list