4632 Commits

Author SHA1 Message Date
Jack Nagel
816531e28d Remove postgresql and mysql audit noise
Closes Homebrew/homebrew#20159.
2013-06-04 11:15:31 -05:00
Samuel John
c524895666 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
903c340664 Audit url/devel/head for redundant :using 2013-05-27 22:25:34 -07:00
Adam Vandenberg
0e7d47332c Add brew search --debian <f> 2013-05-27 17:32:27 -07:00
Jack Nagel
1a7ea33ba5 audit: drop redundant 'each' after 'grep' 2013-05-27 18:31:18 -05:00
Jack Nagel
52d84ba7cf doctor: check git SSL settings on <= 10.5 2013-05-27 10:06:45 -05:00
Jack Nagel
00548b81ce doctor: combine git origin checks 2013-05-26 17:55:34 -05:00
Jack Nagel
255c6e7c3f doctor: combine git existence and version checks 2013-05-26 17:48:12 -05:00
Jack Nagel
6f6d4e5894 doctor: style nits 2013-05-24 19:53:39 -05:00
Jack Nagel
dd9346ada2 outdated: yield version list rather than recreate it 2013-05-24 11:13:27 -05:00
Jack Nagel
5f38c19ba8 upgrade: fix expansion of options for top-level formula objects
Fixes Homebrew/homebrew#20045.
2013-05-24 10:33:08 -05:00
Jack Nagel
04d0cea01c Directory, not folder 2013-05-23 23:33:36 -05:00
Jack Nagel
8b98e83347 doctor: reorganize check_for_macgpg2 2013-05-23 23:28:16 -05:00
Jack Nagel
187b9c9d59 doctor: simplify trailing slash checks 2013-05-23 23:07:20 -05:00
Jack Nagel
6a020239d1 doctor: extract helper from stray file checks 2013-05-23 22:57:00 -05:00
Jack Nagel
1194880cf2 doctor: fix check_for_broken_symlinks
Fixes Homebrew/homebrew#20000.
2013-05-23 11:28:16 -05:00
Adam Vandenberg
46d2b2165a Allow brew log on deleted formulae.
Closes Homebrew/homebrew#19995.
2013-05-23 09:21:33 -07:00
Jack Nagel
42c02a894d doctor: remove stale OS version check
Closes Homebrew/homebrew#19959.
2013-05-22 23:33:22 -05:00
Jack Nagel
3755b33a97 Refactor Xcode/CLT version checks 2013-05-22 22:30:38 -05:00
Daniel Lee Harple
471502bc06 Remove unnecessary rescue-all exception handling
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:05 -05:00
Daniel Lee Harple
0fa5c47d7f Check GitHub API rate limit instead of silently failing
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:04 -05:00
Daniel Lee Harple
222f96d37b Pass a User-Agent when fetching data from the GitHub API
See <http://developer.github.com/v3/#user-agent-required>.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:01 -05:00
Jack Nagel
92b6bcb77d link: extract keg-only check into a helper method 2013-05-20 21:55:01 -05:00
Jack Nagel
40dedcec70 upgrade: fix typo 2013-05-18 22:11:19 -05:00
Jack Nagel
a10cda77be upgrade: use a method rather than a boolean flag 2013-05-18 22:09:15 -05:00
Jack Nagel
26a076eef5 upgrade: tighten installed precondition 2013-05-18 22:09:15 -05:00
Jack Nagel
277f3d3c30 Stop running "prune" as part of "cleanup"
Rationale: "prune" is slow, does not need to be run as often as
"cleanup", and is potentially destructive to things like empty
directories that Homebrew did not create. Thus we should let users run
`brew prune` only when they wish to, while still being able to use `brew
cleanup`.

Closes Homebrew/homebrew#19863.
2013-05-18 20:22:24 -05:00
Jack Nagel
2d8496129c Formula#fetch: always return the cached path
This allows us to remove some type checks that were protecting against
potential nils.
2013-05-16 14:06:26 -05:00
Jack Nagel
daef74aa27 Adjust semantics of Formula#fetch
It doesn't really make logical sense that this method returns both the
fetched path (or sometimes nil!) and the downloader, so just return the
path (again, or nil!) and callers that want the downloader can ask for
it separately.
2013-05-16 14:06:26 -05:00
Jack Nagel
a6f9a1c4a3 fetch: rename 'tarball' to 'download' 2013-05-16 14:06:26 -05:00
Jack Nagel
db0c93dbae fetch: use concat rather than << and flatten 2013-05-16 14:06:25 -05:00
Jack Nagel
903d640d38 Simplify uninstall --force 2013-05-15 22:27:30 -05:00
Jack Nagel
12b63fdd5c uninstall: stop assuming kegs always map to formulae 2013-05-15 22:19:58 -05:00
Jack Nagel
d3a8cb7803 cleanup: enable prune during dry-run mode
Closes Homebrew/homebrew#19826.
2013-05-15 12:57:02 -05:00
Jack Nagel
1197409c36 prune: add dry-run mode 2013-05-15 12:57:01 -05:00
Jack Nagel
f4dcdea64e cleanup: cleanup_all => cleanup_cellar 2013-05-15 12:57:01 -05:00
Jack Nagel
a9fcefda4e cleanup: refactor cleanup_cache 2013-05-15 12:57:01 -05:00
Jack Nagel
5b5bb57865 cleanup: rename variable 2013-05-15 12:57:00 -05:00
Jack Nagel
b26c502f79 cleanup: refactor cleanup_formula 2013-05-15 12:57:00 -05:00
Jack Nagel
87a8f9a6ae cleanup: only map dirs to kegs once 2013-05-15 12:57:00 -05:00
Jack Nagel
daf8c26108 cleanup: use Pathname#rmtree instead of FileUtils 2013-05-15 12:56:59 -05:00
Jack Nagel
b32310c3db cleanup: use subdirs, avoid .directory? checks 2013-05-15 12:56:59 -05:00
Jack Nagel
bf8bf2e1d1 cleanup: remove redundant condition
If f.installed? is true, f.rack.directory? will always be true as well.
2013-05-15 12:56:59 -05:00
Jack Nagel
0c35274bf4 cleanup: rename method for consistency 2013-05-15 12:56:58 -05:00
Jack Nagel
5515d359d5 cleanup: use early return rather than method-spanning conditional 2013-05-15 12:56:58 -05:00
Jack Nagel
8cd331718e cleanup: factor out unqualified cleanup code 2013-05-15 12:56:58 -05:00
Jack Nagel
c48ac0b982 Methods that end in _formula should only accept a formula 2013-05-15 12:56:57 -05:00
Jack Nagel
132e6a3a8e audit: fix version audit for Version subclasses
The version isn't redundant if a subclass of Version is specified.
2013-05-14 20:17:00 -05:00
Jack Nagel
8b763acc2a outdated: always do comparisons with a Formula as the receiver
It is possible for the object returned by Formula#version to be a
subclass of Version with special behavior, so we want to use that for
the comparison.
2013-05-14 20:11:48 -05:00
Jack Nagel
46f8be1d9e Use Hash#each_value rather than discarding key 2013-05-11 16:06:18 -05:00