Commit Graph
18 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
Mike McQuaid 2d9329f14e Allow requirements to specify a default formula.
This allows default resolution of requirements without user intervention.

Closes #19627.
2013-05-10 13:37:41 +01:00
Jack Nagel 74381fef56 Update github URLs 2013-04-06 21:34:41 -05:00
Damien Pollet 855b0d79e6 shocco: patch configure to pass markdown path
Closes #18516.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-03-16 09:00:15 -07:00
Adam Vandenberg d02047720e shocco: use a tarball 2013-03-15 15:47:15 -07:00
Adam Vandenberg c81499a042 shocco: style nits 2013-01-27 14:54:50 -08:00
Jack Nagel 21efd0803c Infer path to be added for requirements that search PATH
When a requirement is specified like:

  satisfy { which "foo" }

There is no reason that we should inject all of ENV.userpaths! into the
build environment. Instead, infer the directory to be added to PATH from
the Pathname that is returned.

This is another step towards condensing the "which program" requirements
down into a one-liner DSL element.
2013-01-22 14:59:10 -06:00
Jack Nagel f863ea9f26 shocco: env :userpaths for markdown requirement 2013-01-22 07:41:29 -06: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
Peter Aronoff d315c98d44 shocco: move hard markdown dep to Requirement
schocco requires a `markdown` command. The previous version of the formula
checked for the markdown formula. However, there's an edge case involved.
The discount formula installs a command `markdown` which can also satisfy
shocco's requirement. (And I would add that discount's implementation of
the `markdown` command is far superior to markdown's, though I grant that's
debatable.)

This update checks for any `markdown`-providing install, and if one is not
found tells the user what options are available.

I think this is better than just installing the markdown formula. First, if
discount is already installed, then when `brew` tries to install markdown,
the linking stage will fail. Although the shocco install as a whole will go
through, the failure message about linking markdown is likely to confuse
the user.  Also, if discount is already installed, that problably means the
user doesn't want the markdown formula. Finally, this way of handling
things is more easily extended if other formulas become available which
provide a valid `markdown` command.

Closes #16740.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-12-27 20:26:00 -04:00
Aaron Peschel e2fe41bd6b shocco: use stable commit, fix install
Fixes three issues with this formula:

1) Install is not working
2) Not installing from a tarball
3) Non-standard install process

The following is a list of changes:

* Point to shocco tarball instead of git repo.
* Point to latest version of shocco
* Point to latest version of Pygments
* Add sha1 for Pygments
* Fix install to follow standard Homebrew process.

Closes #16700.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-12-24 19:42:54 -04:00
Mike McQuaid 3c5ca25cad Batch convert MD5 formula to SHA1.
Closes #14653.
2012-09-03 11:36:42 -07:00
Adam Vandenberg a58761f0db shocco: use install_symlink 2012-02-12 20:09:02 -08:00
Adam Vandenberg 4e7c332a48 Use https for github repos. 2011-05-26 22:02:55 -07:00
Adam Vandenberg 0476235ce0 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Adam Vandenberg ca7c750fe1 shocco - Homebrew fix was pulled upstream 2010-05-06 07:12:02 -07:00
Adam Vandenberg 4ebc9b4652 Formula for a standalone build of shocco 2010-05-05 21:20:11 -07:00