Commit Graph

14 Commits (2d45c20d9ade73931328861d818137cf10505f92)

Author SHA1 Message Date
Samuel John f6e80bdea2 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 538abd7d95 pygtk: depends on pkg-config 2013-02-09 23:53:29 -06:00
Ben Hoskings 36b1eeace9 pygtk: depends on atk
Closes Homebrew/homebrew#17526.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-02-02 11:34:28 -06:00
Jack Nagel 802db3a44c pygtk: fix test 2013-02-01 23:38:56 -06:00
Adam Vandenberg 97a87da8b3 pygtk: style nits 2013-01-28 21:40:23 -08:00
Jack Nagel 8c673861d4 pygtk: use new test DSL 2013-01-06 21:23:33 -06:00
Samuel John dde10b6d56 pygtksourceview: New formula (2.10.0)
- New formula pygtksourceview with test (fixes Homebrew/homebrew#16410)
- Fix the pkgconfig file of pygtk, too, because the
  GTK project moved the `codegen` executable from
  pygtk into pygobject.
- Fix minor typo in pygtk.

Fixes Homebrew/homebrew#16410.
Closes Homebrew/homebrew#16418.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-04 12:17:41 -08:00
Samuel John dd3d94f470 pygtk: Option for gtk.glade bindings
Fixes Homebrew/homebrew#16269.
Closes Homebrew/homebrew#16401.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-12-04 09:58:24 -08:00
Mike McQuaid 88779ade49 Batch convert MD5 formula to SHA1.
Closes Homebrew/homebrew#14653.
2012-09-03 11:36:42 -07:00
Jack Nagel 85c64af67f pygtk: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 13:01:04 -05:00
nibbles 2bits ba9091bec2 pygtk: depends_on :x11
pygtk-2.24.0 on Lion will not compile because it can't find
`<pango/pangocairo.h>.  This occurs because pkgconfig has trouble
querying the pangocairo.pc module because it complains that a
required module, `fontconfig` can't be found and suggests adding
it's path to `PKG_CONFIG_PATH`.  We know `fontconfig` is a part
of X11.  So add `depends_on :x11` to the formula so that all the
pkgconfig modules can be located.

Tested by importing pygtk, importing cairo, and by running
`brew test -v pygtk` on Lion with clang and llvm from XCode-4.3.3.

Fixes Homebrew/homebrew#13205 and possibly Homebrew/homebrew#13256

Closes Homebrew/homebrew#13257.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-07 02:42:11 -05:00
Jack Nagel fd58bd13e6 pygtk: add PYTHONPATH caveats
Closes Homebrew/homebrew#10905.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-16 19:56:16 -05:00
Adam Vandenberg da3fdbd0cf Use "cd" instead of "Dir.chdir"
* And "mkdir" isntead of "Dir.mkdir"
* And "Dir[]" instead of "Dir.glob"
* Also style fixes and nitpicks
2012-02-24 21:35:50 -08:00
John Harrison 21e0f3213c pygtk 2.24.0
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-18 21:38:50 -08:00