[Distutils] easy_install picks windows egg on Linux

Jean-Paul Calderone exarkun at divmod.com
Thu May 21 19:49:55 CEST 2009


Hi all,

I just noticed that easy_install selects a Windows binary egg when trying to
install pyOpenSSL on Linux.  Predictably, this fails:

$ PYTHONPATH=/tmp/junk6 easy_install --install-dir /tmp/junk6 --dry-run pyOpenSSL
Creating /tmp/junk6/site.py
Searching for pyOpenSSL
Reading http://pypi.python.org/simple/pyOpenSSL/
Reading http://pyopenssl.sourceforge.net/
Reading http://launchpad.net/pyopenssl
Best match: pyOpenSSL 0.9.py2.5
Downloading http://pypi.python.org/packages/2.5/p/pyOpenSSL/pyOpenSSL-0.9.py2.5-winxp32.egg#md5=38d273a65bae20f527ff8d21c225d10e
Processing pyOpenSSL-0.9.py2.5-winxp32.egg
Moving pyOpenSSL-0.9.py2.5-winxp32.egg to /tmp/junk6
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c8', 'console_scripts', 'easy_install')()
  File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 1671, 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 1675, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  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 476, 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
exarkun at charm:/tmp$ 

Is this a known issue?

Jean-Paul


More information about the Distutils-SIG mailing list