aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pyqt.rb
blob: b289e6c58147ee52065b769b273a8cd34fbe2576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'formula'

# NOTE this should be provided by pip eventually
# currently easy_install doesn't seem to support it

class Pyqt <Formula
  url 'http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.6.1.tar.gz'
  homepage 'http://www.riverbankcomputing.co.uk/software/pyqt'
  md5 'c04aade8b63795f30ee7da2d3405d7e7'

  depends_on 'sip'
  depends_on 'qt'

  def install
    ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/python", ':'
    
    system "python", "./configure.py", "-g", "--confirm-license",
                                       "--bindir=#{bin}",
                                       "--destdir=#{lib}/python",
                                       "--sipdir=#{share}/sip"
    system "make"
    system "make install"
  end
  
  def caveats; <<-EOS
This formula won't function until you add the following to your PYTHONPATH
environment variable:

#{HOMEBREW_PREFIX}/lib/python

Installing with easy_install would be ideal; then the libraries are installed
to /Library/Python which is in the default OS X Python library path. However
easy_install does not support this formula.
    EOS
  end
end