diff options
| author | Samuel John | 2013-07-23 13:03:06 +0200 |
|---|---|---|
| committer | Samuel John | 2013-07-23 13:03:06 +0200 |
| commit | b01304eeb4c289f469047a57b32a6b47740a2f26 (patch) | |
| tree | ef2e8bfa7ea180bf9d1d76be97217de7883c120a /Library | |
| parent | 49e8f9b5ff1a0fe6513715d98e22c0227d09339e (diff) | |
| download | homebrew-b01304eeb4c289f469047a57b32a6b47740a2f26.tar.bz2 | |
python: Setuptools 0.9.7 and rm old ones
Remove old setuptools installations that may still fly around and be
listed in the easy_install.pth. This can break setuptools build with
zipimport.ZipImportError: bad local file header
This does not always happen, but if the easy_install.pth points to an
egg with an older version. Removing all setuptools and distribute
remains inside the homebrew global_site_packages is safe.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/python.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index e5f1d178f..d449c5fc9 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -1,8 +1,8 @@ require 'formula' class Setuptools < Formula - url 'https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.5.tar.gz' - sha1 'a6ea38fb68f32abf7c1b1fe9a9c56c413f096c3a' + url 'https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.7.tar.gz' + sha1 'c56c5cc55b678c25a0a06f25a122f6492d62e2d3' end class Pip < Formula @@ -128,6 +128,14 @@ class Python < Formula # We ship setuptools and pip and reuse the PythonInstalled # Requirement here to write the sitecustomize.py py = PythonInstalled.new("2.7") + + # Remove old setuptools installations that may still fly around and be + # listed in the easy_install.pth. This can break setuptools build with + # zipimport.ZipImportError: bad local file header + # setuptools-0.9.5-py3.3.egg + rm_rf Dir["#{py.global_site_packages}/setuptools*"] + rm_rf Dir["#{py.global_site_packages}/distribute*"] + py.binary = bin/'python' py.modify_build_environment setup_args = [ "-s", "setup.py", "--no-user-cfg", "install", "--force", "--verbose", |
