diff options
Diffstat (limited to 'Library')
| -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 |
