aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
authorSamuel John2013-08-08 12:13:48 +0200
committerSamuel John2013-08-08 12:22:49 +0200
commit95f968fafb40efda612fc50355e993df709312cf (patch)
treec9f52f3428c12725578bf1ca59252abf437e8d26 /Library/Formula/python3.rb
parent8212f641b10db42474fb569d77ffcfb3e93ed7fd (diff)
downloadhomebrew-95f968fafb40efda612fc50355e993df709312cf.tar.bz2
python3: reuse PythonInstalled better
We can use `PythonInstalled#binary`. typo fix.
Diffstat (limited to 'Library/Formula/python3.rb')
-rw-r--r--Library/Formula/python3.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index 4fbae4083..b8e526531 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -131,13 +131,15 @@ class Python3 < Formula
# Symlink the prefix site-packages into the cellar.
ln_s site_packages, site_packages_cellar
- # "python3" and executable is forgotten for framework builds.
+ # "python3" executable is forgotten for framework builds.
# Make sure homebrew symlinks it to HOMEBREW_PREFIX/bin.
ln_s "#{bin}/python#{VER}", "#{bin}/python3" unless (bin/"python3").exist?
# We ship setuptools and pip and reuse the PythonInstalled
# Requirement here to write the sitecustomize.py
py = PythonInstalled.new(VER)
+ py.binary = bin/"python#{VER}"
+ py.modify_build_environment
# Remove old setuptools installations that may still fly around and be
# listed in the easy_install.pth. This can break setuptools build with
@@ -146,13 +148,13 @@ class Python3 < Formula
rm_rf Dir["#{py.global_site_packages}/setuptools*"]
rm_rf Dir["#{py.global_site_packages}/distribute*"]
- py.binary = bin/"python#{VER}"
- py.modify_build_environment
setup_args = [ "-s", "setup.py", "install", "--force", "--verbose",
"--install-scripts=#{bin}", "--install-lib=#{site_packages}" ]
- Setuptools.new.brew { system "#{bin}/python#{VER}", *setup_args }
+
+ Setuptools.new.brew { system py.binary, *setup_args }
mv bin/'easy_install', bin/'easy_install3'
- Pip.new.brew { system "#{bin}/python#{VER}", *setup_args }
+
+ Pip.new.brew { system py.binary, *setup_args }
mv bin/'pip', bin/'pip3'
# And now we write the distuitsl.cfg