aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike McQuaid2014-03-07 18:08:09 +0000
committerMike McQuaid2014-03-12 13:57:00 +0000
commiteae88425082acbf571d256aa768b3522f0664bd5 (patch)
treea6161e23d54ccee27794bf0fc2e8e5be9907e3db /Library/Formula
parent0c0e1ef0ec9d03afd38f3f39e2cb3ac28e49c039 (diff)
downloadhomebrew-eae88425082acbf571d256aa768b3522f0664bd5.tar.bz2
sip: use Language::Python.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/sip.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/Library/Formula/sip.rb b/Library/Formula/sip.rb
index 997a5eed8..f4dac7879 100644
--- a/Library/Formula/sip.rb
+++ b/Library/Formula/sip.rb
@@ -14,16 +14,6 @@ class Sip < Formula
odie "sip: --with-python3 must be specified when using --without-python"
end
- def pythons
- pythons = []
- ["python", "python3"].each do |python|
- next if build.without? python
- version = /\d\.\d/.match `#{python} --version 2>&1`
- pythons << [python, version]
- end
- pythons
- end
-
def install
if build.head?
# Link the Mercurial repository into the download directory so
@@ -33,7 +23,7 @@ class Sip < Formula
system "python", "build.py", "prepare"
end
- pythons.each do |python, version|
+ Language::Python.each_python(build) do |python, version|
# Note the binary `sip` is the same for python 2.x and 3.x
system python, "configure.py",
"--deployment-target=#{MacOS.version}",
@@ -43,7 +33,7 @@ class Sip < Formula
"--sipdir=#{HOMEBREW_PREFIX}/share/sip"
system "make"
system "make", "install"
- system "make", "clean" if pythons.length > 1
+ system "make", "clean"
end
end