Commit Graph
12 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
Adam Vandenberg 2464b81eba cvs2svn: style nits 2013-01-27 14:54:49 -08:00
Jack Nagel 3ad7174f7d Use new requirement syntax 2013-01-21 17:36:34 -06:00
Jack Nagel 43f2bfaafc Use fatal DSL method in requirements 2013-01-18 19:30:43 -06:00
Adam Vandenberg 276fd63718 caveat and other cleanups 2012-11-25 11:42:57 -08:00
Mike McQuaid 3c5ca25cad Batch convert MD5 formula to SHA1.
Closes #14653.
2012-09-03 11:36:42 -07:00
Jack Nagel f944ac3aa0 Convert some /usr/bin/which calls to use the 'which' method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:55 -05:00
Jack Nagel 5d5760a4cb cvs2svn: use a requirement for python with gdbm
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-28 16:33:55 -05:00
Jack Nagel e15e01c1ec 'CHANGES' is also a meta file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-11 21:59:30 -06:00
Adam Vandenberg 0476235ce0 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Adam Vandenberg be9b9bb30d use gzip multi-arg support 2010-09-19 11:15:10 -07:00
John Albin Wilkins b886d57a9a Add cvs2svn
Signed-off-by: Adam Vandenberg <flangy@gmail.com>

* Use a run-time check to see if the default Python has gdbm
2010-08-10 20:41:26 -07:00