Commit Graph
36 Commits
Author SHA1 Message Date
Samuel John 0b50110107 Python 2.x and 3.x support
New `depends_on :python` Dependency.
New `depends_on :python3` Dependency.

To avoid having multiple formulae with endings -py2 and -py3,
we will handle support for different pythons (2.x vs. 3.x)
in the same formula.
Further brewed vs. external python will be transparently supported.

The formula also gets a new object `python`, which is false if
no Python is available or the user has disabled it. Otherwise
it is defined and provides several support methods:

python.site_packages # the site-packages in the formula's Cellar
python.global_site_packages
python.binary # the full path to the python binary
python.prefix
python.version
python.version.major
python.version.minor
python.xy # => e.g. "python2.7"
python.incdir # includes of python
python.libdir # the python dylib library
python.pkg_config_path # used internally by brew
python.from_osx?
python.framework?
python.universal?
python.pypy?
python.standard_caveats # Text to set PYTHONPATH for python.from_osx?
python.if3then3 # => "" for 2.x and to "3" for 3.x.

Further, to avoid code duplication, `python` takes an optional
block that is run twice if the formula defines depends_on
:python AND :python3.

python do
  system python, 'setup.py', "--prefix=#{prefix}"
end

Read more in the Homebrew wiki.
2013-06-03 17:29:43 +02:00
Jack Nagel 4643b88049 sip: only apply patch to HEAD
Fixes #19919.
2013-05-18 21:16:25 -05:00
Jack Nagel f65fe50d7a sip 4.14.6 2013-05-18 18:20:26 -05:00
Adam Vandenberg 3d0098200f sip: fix patch fuzz 2012-10-28 15:57:04 -07:00
Adam Vandenberg 80e6ed2272 sip: use new dsl 2012-08-22 21:29:50 -07:00
Jack Nagel 4affbabfb7 Replace version strings with Version objects 2012-08-18 11:12:08 -05:00
Sebastian Krysmanski 60969543fa sip: add sipdir
The sip path option was missing from the sip keg. This broke py2app.

Closes #12388.
2012-08-09 22:33:24 -07:00
Michael Bashkirov fddbc4aa85 SIP 4.13.3
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-23 10:09:55 -07:00
samueljohn 53d0a784ee sip: fix for Xcode-only install
- Pass in CFLAGS and LDFLAGS. Note, LDFLAGS have to be passed into
  configure.py as "LFLAGS".

Closes #12884.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 10:58:07 -05:00
samueljohn 2bf9bba72b sip & pyqt: Now use lib/pythonX.Y/site-packages
Benefit: For brewed Python, adding stuff to the PYTHONPATH is no longer needed.
For other Pythons nothing changes but the X.Y part in the path. Oh, and you
only need to edit your PYTHONPATH once.

- Added a method to get the major.minor version number from the current python
- Updated the caveats to reflect the new path

Fixes #8182.
Closes #10051.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-02-16 00:03:07 -08:00
Nibbles 2bits db635cf867 sip 4.13.2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-12 18:21:24 -08:00
Jussi Sarkkinen 042cf7a224 PyQt: Update to 4.9
Restores compatibility with Qt 4.8.x. Also upgrades SIP to 4.13.1.

Fixes #9225.
Closes #9249.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-23 12:55:54 -08:00
Charlie Sharpsteen 6cdd197805 SIP 4.12.4
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-10 10:30:14 -07:00
Charlie Sharpsteen a7784fc598 Revert SIP URL to Mercurial archives
The SIP dowload URL on the Riverbank website is not stable. The Mercurial
archives are.

Sorts out patch application and version numbering for HEAD builds.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-06 11:23:34 -07:00
Ches Martin ee4fd13b5c sip: fix release URL
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-05 09:45:51 -07:00
Ches Martin f3d4f9ca09 Update PyQt to 4.8.4, sip 4.12.2
PyQt 4.8.4 has just been released, and apparently they can't be
bothered to keep the previous tarball in place...

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-05 06:43:06 -07:00
Adam Vandenberg 0476235ce0 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Charlie Sharpsteen 0cceae6cf4 Bump PyQt to 4.8.3 and SIP to 4.12.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-02-06 11:51:17 -08:00
Adam Vandenberg d88f19696e Fix sip version number in patch. 2010-12-30 08:43:02 -08:00
Adam Vandenberg 3ae0251b42 Sip 4.12 2010-12-28 12:21:34 -08:00
Christopher 3f16d53109 sip - removed check for Framework Python
removed the apparently unnecesary check for a framework build of python from
the sip build and stopped using system python for sip and pyqt

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-26 09:35:49 -07:00
Emmanuel Blot b5dc6e3bf0 Update SIP and PyQt to the latest versions released on October 22nd, '10
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-24 17:30:04 -07:00
Charlie Sharpsteen 0d5971c386 Fixed SIP version number
The build.py script which prepares SIP for configuration and installation
requires the presence of Mercurial's `.hg` directory in order to determine the
version number from the tag list.  Without this directory it sets the SIP
version number to "0.1-unknown" which causes things like PyQt to fail
complaining that the SIP version number is too small.

This change includes a small patch to build.py that fixes the version number so
that it reads 4.11.1 which is the current version.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-12 07:09:39 -07:00
Charlie Sharpsteen 194b0fa6b1 Altered SIP formula to install from Mercurial repos
Riverbank has a nasty habit of pulling old tarballs whenever new releases are
made.  New releases are made fairly often--- this leads to a state where the
PyQT and SIP formulae are chronically broken due to outdated tarball links.

This changeset patches the SIP formula to install from the Mercurial repository
for SIP located at:

  http://www.riverbankcomputing.co.uk/hg/sip

By default this formula installs an archived tarball from a tag corresponding to
the released version of SIP.  Tarballs are fetched using HTTP.

If the user has Mercurial installed, bleeding-edge versions can be installed by
specifying the --HEAD switch.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-09-22 07:17:04 -07:00
Charlie Sharpsteen f3042f1e20 Update SIP from v. 11 to 11.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-09-13 08:40:38 -07:00
David Höppner 38e487e9d9 sip: fixes #2322 2010-08-31 20:39:36 +02:00
Laurent 764ee6917f fixing issue 2320
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-08-31 17:59:49 +02:00
Charlie Sharpsteen 0f885a3dd3 Upadted SIP to 4.10.5
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-07-21 09:48:16 -07:00
Adam Vandenberg 49d167def5 Bump versions of pyqt and sip 2010-07-13 14:07:54 -07:00
Adam Vandenberg fee76dece4 Force sip to build against the system (Framework) Python.
Fixes #930
2010-06-16 14:06:54 -07:00
Adam Vandenberg 799fe118c7 Bump sip to 4.10.2; previous download was 404 2010-05-09 20:18:41 -07:00
Max Howell c4decd76fb String.undent for prettier HEREDOCs 2010-03-07 17:57:05 +00:00
Max Howell d6290bf0a5 Bump SIP to 4.10
Fixes #479
2010-01-16 19:06:26 +00:00
Travis Cline 385e96587c updated url in sip formula 2010-01-14 10:00:18 +00:00
Max Howell 82ec431d3c Install into Homebrew prefix
This is the problem with doing our own Python stuff. But easy_install doesn't
work great. The solution is probably jezdez's pip formula.
2009-11-07 18:22:34 +00:00
Russ 9a0e572e56 Riverbank SIP 2009-11-07 18:22:34 +00:00