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.
- 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>
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>
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>
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>
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>
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>
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>