Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
python: Use PythonInstalled#binary
Browse files Browse the repository at this point in the history
This simplyfies the formula a bit.
Also rearrange the line to be more logically grouped. Hopefully.
  • Loading branch information
samueljohn committed Aug 8, 2013
1 parent 59ebdf6 commit 6c5f51a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Library/Formula/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def install
# We ship setuptools and pip and reuse the PythonInstalled
# Requirement here to write the sitecustomize.py
py = PythonInstalled.new("2.7")
py.binary = bin/'python'
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
Expand All @@ -138,12 +140,10 @@ def install
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",
"--install-scripts=#{bin}", "--install-lib=#{site_packages}" ]
Setuptools.new.brew { system "#{bin}/python2", *setup_args }
Pip.new.brew { system "#{bin}/python2", *setup_args }
Setuptools.new.brew { system py.binary, *setup_args }
Pip.new.brew { system py.binary, *setup_args }

# And now we write the distuitsl.cfg
cfg = prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/distutils.cfg"
Expand Down

0 comments on commit 6c5f51a

Please sign in to comment.