diff options
| author | Adam Vandenberg | 2013-09-24 22:22:05 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-09-26 21:54:36 -0700 |
| commit | 0459ea18a28239468772cae9608705d5a195542c (patch) | |
| tree | d4c40a7c70d9a05a1be2c9569deb14b9208daaa6 /Library | |
| parent | dc7a53dd0f84cfce9299ae01795bfaa7e335694a (diff) | |
| download | homebrew-0459ea18a28239468772cae9608705d5a195542c.tar.bz2 | |
pypy: install to libexec and install pip
* sequester pypy in `libexec` and symlink out its binaries only
* re-add pip installation to pypy
Fixes #20809.
Closes #22807.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pypy.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Library/Formula/pypy.rb b/Library/Formula/pypy.rb index bfabe5930..d3866620d 100644 --- a/Library/Formula/pypy.rb +++ b/Library/Formula/pypy.rb @@ -13,10 +13,19 @@ class Pypy < Formula sha1 'b8bf9c2b8a114045598f0e16681d6a63a4d6cdf9' end + resource 'pip' do + url 'https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz' + sha1 '9766254c7909af6d04739b4a7732cc29e9a48cb0' + end + def install rmtree 'site-packages' - prefix.install Dir['*'] + # The PyPy binary install instructions suggest installing somewhere + # (like /opt) and symlinking in binaries as needed. Specifically, + # we want to avoid putting PyPy's Python.h somewhere that configure + # scripts will find it. + libexec.install Dir['*'] # Post-install, fix up the site-packages and install-scripts folders # so that user-installed Python software survives minor updates, such @@ -26,7 +35,7 @@ class Pypy < Formula prefix_site_packages.mkpath # Symlink the prefix site-packages into the cellar. - ln_s prefix_site_packages, prefix+'site-packages' + ln_s prefix_site_packages, libexec+'site-packages' # Tell distutils-based installers where to put scripts scripts_folder.mkpath @@ -39,7 +48,8 @@ class Pypy < Formula # $ easy_install pip # $ pip install --upgrade setuptools # to get newer versions of setuptools outside of Homebrew. - resource('setuptools').stage { system "#{bin}/pypy", "setup.py", "install" } + resource('setuptools').stage { system "#{libexec}/bin/pypy", "setup.py", "install" } + resource('pip').stage { system "#{libexec}/bin/pypy", "setup.py", "install" } # Symlink to easy_install_pypy. unless (scripts_folder+'easy_install_pypy').exist? @@ -84,6 +94,6 @@ class Pypy < Formula # The Cellar location of distutils def distutils - prefix+"lib-python/2.7/distutils" + libexec+"lib-python/2.7/distutils" end end |
