diff options
| author | Mike McQuaid | 2014-03-08 12:08:21 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-12 13:57:06 +0000 |
| commit | 5e660ec4b565089747d4093c761948864472b65c (patch) | |
| tree | 2b221924c5f74e92cb69ded478c275c9f728c672 /Library/Formula | |
| parent | ab1ba4ed836bf7cd60a2ad45b556ffb84fdd0974 (diff) | |
| download | homebrew-5e660ec4b565089747d4093c761948864472b65c.tar.bz2 | |
qscintilla2: use Language::Python.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/qscintilla2.rb | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/Library/Formula/qscintilla2.rb b/Library/Formula/qscintilla2.rb index bcb458e5c..40b27be25 100644 --- a/Library/Formula/qscintilla2.rb +++ b/Library/Formula/qscintilla2.rb @@ -1,21 +1,5 @@ require 'formula' -class PythonEnvironment < Requirement - fatal true - - satisfy do - !(!Formula["python"].installed? && ARGV.include?("--without-python") && ARGV.include?("--with-python3")) - end - - def message - <<-EOS.undent - You cannot use system Python 2 and Homebrew's Python 3 - simultaneously. - Either `brew install python` or use `--without-python3`. - EOS - end -end - class Qscintilla2 < Formula homepage 'http://www.riverbankcomputing.co.uk/software/qscintilla/intro' url 'https://downloads.sf.net/project/pyqt/QScintilla2/QScintilla-2.8/QScintilla-gpl-2.8.tar.gz' @@ -30,16 +14,6 @@ class Qscintilla2 < Formula depends_on "pyqt" 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 # On Mavericks we want to target libc++, this requires a unsupported/macx-clang-libc++ flag if ENV.compiler == :clang and MacOS.version >= :mavericks @@ -63,7 +37,7 @@ class Qscintilla2 < Formula end cd 'Python' do - pythons.each do |python, version| + Language::Python.each_python(build) do |python, version| (share/"sip").mkpath system python, "configure.py", "-o", lib, "-n", include, "--apidir=#{prefix}/qsci", @@ -73,7 +47,7 @@ class Qscintilla2 < Formula "--spec=#{spec}" system 'make' system 'make', 'install' - system "make", "clean" if pythons.length > 1 + system "make", "clean" end end end @@ -83,10 +57,7 @@ class Qscintilla2 < Formula import PyQt4.Qsci assert("QsciLexer" in dir(PyQt4.Qsci)) EOS - pythons.each do |python, version| - unless Formula[python].installed? - ENV["PYTHONPATH"] = HOMEBREW_PREFIX/"lib/python#{version}/site-packages" - end + Language::Python.each_python(build) do |python, version| system python, "test.py" end end |
