diff options
| author | Mike McQuaid | 2014-01-04 13:15:18 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-04 13:35:46 +0000 |
| commit | 696c07bc1ef29a55b9f0535c8ba8aca45cb2d84a (patch) | |
| tree | 0b2dad71019e3d05a186f26faf9365ae4846cc15 /Library/Formula | |
| parent | b5737a9aab96f3ea95c7adea752ad7316c84c841 (diff) | |
| download | homebrew-696c07bc1ef29a55b9f0535c8ba8aca45cb2d84a.tar.bz2 | |
pyside: cleanup python usage.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pyside.rb | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/Library/Formula/pyside.rb b/Library/Formula/pyside.rb index 4629ce0a2..1be7a8b81 100644 --- a/Library/Formula/pyside.rb +++ b/Library/Formula/pyside.rb @@ -9,15 +9,7 @@ class Pyside < Formula head 'git://gitorious.org/pyside/pyside.git' depends_on 'cmake' => :build - depends_on :python => :recommended - depends_on :python3 => :optional - - if build.with? 'python3' - depends_on 'shiboken' => 'with-python3' - else - depends_on 'shiboken' - end - + depends_on 'shiboken' depends_on 'qt' def patches @@ -25,36 +17,24 @@ class Pyside < Formula end def install - python do - # Add out of tree build because one of its deps, shiboken, itself needs an - # out of tree build in shiboken.rb. - mkdir "macbuild#{python.if3then3}" do - args = std_cmake_args + %W[ - -DSITE_PACKAGE=#{python.site_packages} - -DALTERNATIVE_QT_INCLUDE_DIR=#{Formula.factory('qt').opt_prefix}/include - -DQT_SRC_DIR=#{Formula.factory('qt').opt_prefix}/src - .. - ] - # The next two lines are because shiboken needs them - args << "-DPYTHON_SUFFIX='-python2.7'" if python2 - args << "-DPYTHON_SUFFIX='.cpython-33m'" if python3 - system 'cmake', *args - system 'make' - system 'make', 'install' - system 'make', 'clean' - # Todo: How to deal with pyside.pc file? It doesn't support 2.x and 3.x! - end + # Add out of tree build because one of its deps, shiboken, itself needs an + # out of tree build in shiboken.rb. + mkdir "macbuild" do + args = std_cmake_args + %W[ + -DSITE_PACKAGE=#{lib}/python2.7/site-packages + -DALTERNATIVE_QT_INCLUDE_DIR=#{Formula.factory('qt').opt_prefix}/include + -DQT_SRC_DIR=#{Formula.factory('qt').opt_prefix}/src + -DPYTHON_SUFFIX='-python2.7' + .. + ] + system 'cmake', *args + system 'make' + system 'make', 'install' end end test do - python do - system python, '-c', "from PySide import QtCore" - end - end - - def caveats - python.standard_caveats if python + system 'python', '-c', "from PySide import QtCore" end end |
