diff options
| author | Tim D. Smith | 2014-12-12 21:23:31 -0800 |
|---|---|---|
| committer | Tim D. Smith | 2014-12-13 11:49:21 -0800 |
| commit | 8a6fece25e954f368cd3f4a7130531a7eeddfb71 (patch) | |
| tree | cdbbf2581d26ae805a36a0331c95cf5c8efbb7dd /Library/Formula | |
| parent | 2b190c0c74d5e37d875ed08091cd425d2dcc52f0 (diff) | |
| download | homebrew-8a6fece25e954f368cd3f4a7130531a7eeddfb71.tar.bz2 | |
bottle pyside and shiboken against system Python
pyside and shiboken can be built against system Python and imported with
Homebrew's Python; use `option "without-python"` instead of `depends_on
:python` in order to bottle against system Python so we don't install
Homebrew's python unnecessarily.
Closes #34945.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pyside.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/shiboken.rb | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Library/Formula/pyside.rb b/Library/Formula/pyside.rb index f971287c1..dc2d08ee2 100644 --- a/Library/Formula/pyside.rb +++ b/Library/Formula/pyside.rb @@ -8,7 +8,9 @@ class Pyside < Formula head 'git://gitorious.org/pyside/pyside.git' - depends_on :python => :recommended + # don't use depends_on :python because then bottles install Homebrew's python + option "without-python", "Build without python 2 support" + depends_on :python => :recommended if MacOS.version <= :snow_leopard depends_on :python3 => :optional option "without-docs", "Skip building documentation" diff --git a/Library/Formula/shiboken.rb b/Library/Formula/shiboken.rb index 9575b7588..37f95ec00 100644 --- a/Library/Formula/shiboken.rb +++ b/Library/Formula/shiboken.rb @@ -18,7 +18,9 @@ class Shiboken < Formula depends_on 'cmake' => :build depends_on 'qt' - depends_on :python => :recommended + # don't use depends_on :python because then bottles install Homebrew's python + option "without-python", "Build without python 2 support" + depends_on :python => :recommended if MacOS.version <= :snow_leopard depends_on :python3 => :optional def install @@ -29,16 +31,12 @@ class Shiboken < Formula args = std_cmake_args # Building the tests also runs them. args << "-DBUILD_TESTS=ON" - # if not System Python - python_framework = "#{Formula[python].opt_prefix}/Frameworks/Python.framework/Versions/#{version}" - if version.to_s[0,1] == "2" && Formula["python"].installed? - args << "-DPYTHON_INCLUDE_DIR:PATH=#{python_framework}/Headers" - args << "-DPYTHON_LIBRARY:FILEPATH=#{python_framework}/lib/libpython#{version}.dylib" - elsif version.to_s[0,1] == "3" && Formula["python3"].installed? + if python == "python3" && Formula["python3"].installed? + python_framework = (Formula["python3"].opt_prefix)/"Frameworks/Python.framework/Versions/#{version}" args << "-DPYTHON3_INCLUDE_DIR:PATH=#{python_framework}/Headers" args << "-DPYTHON3_LIBRARY:FILEPATH=#{python_framework}/lib/libpython#{version}.dylib" - args << "-DUSE_PYTHON3:BOOL=ON" end + args << "-DUSE_PYTHON3:BOOL=ON" if python == "python3" args << ".." system "cmake", *args system "make", "install" |
