16336 Commits

Author SHA1 Message Date
Samuel John
7aa2bcc3d5 Python add -F#{python.framework} for brewed Python
Since Python has been removed from superenv and
added as an explicit `depends_on :python`,
we should add
`-F#{HOMEBREW_PREFIX}/opt/python/Framewoks`
so that build tools that don't use
`python-config --ldflags` (as they should!)
can link against brewed Python.
2013-06-05 14:46:02 +02:00
Samuel John
4dac954cdb ENV.userpaths! Hotfix to prefer brewed stuff
The depends_on 'nose' => :python

tests fails even if people did `pip install nose`
with their brewed pythons because during
the tests the PATH is set up such that
/usr/bin comes before HOMEBRE_PREFIX/bin.

This is a hot fix. Proper fix need resorting
the PATH.
2013-06-04 22:33:24 +02:00
Samuel John
441f7f4576 python_helper style bit 2013-06-04 22:07:15 +02:00
Samuel John
135eb31d6f Python is less verbose with "brew: Using python.."
Now it is only shown for an `python do ... end` block
and not for ordinary python.site_packages or other
methods.
2013-06-04 21:10:39 +02:00
Jack Nagel
816531e28d Remove postgresql and mysql audit noise
Closes Homebrew/homebrew#20159.
2013-06-04 11:15:31 -05:00
Jack Nagel
b97b013fce Extract attr_rw from Formula for reuse
Closes Homebrew/homebrew#20239.
2013-06-04 11:06:18 -05:00
Samuel John
8781950294 Python: Don't use named tuples to get the version
sys.version_info.major is only possible on 2.7+ or so.
Therefore, we now use [0] instead.
2013-06-04 17:14:15 +02:00
Samuel John
623b21a7bd mercurial: Install python bindings properly
Also allow to build with --HEAD by making brew's
download strategy aware of a brewed but unlined hg.

Adapted the caveats so that the procedure to brew
hg --HEAD is clear.

Mention how to config hgk in the caveats.
2013-06-04 17:05:02 +02:00
Mike McQuaid
bca356dd70 Don't error out on unreleased OSX versions.
References Homebrew/homebrew#20142.
2013-06-04 13:58:08 +01:00
Jack Nagel
b87bf885c4 FormulaInstaller: fix "optional build-time dep" edge case
An "optional build-time dep" is unlikely, but possible, and I happen to
notice this wasn't handled correctly while digging around in the deps
code over the last few days.
2013-06-03 22:55:28 -05:00
Jack Nagel
0b4316fbd4 FormulaInstaller: split up big method 2013-06-03 22:50:11 -05:00
Jack Nagel
ef0920e01d Remove unnecessary use of instance_eval 2013-06-03 17:03:09 -05:00
Jack Nagel
ba0ce82b68 Revert "Remove default_formula from MPIDependency."
This reverts commit 9aaa89dbe832387249ab3ea4e22a8018cc9fe30a.
2013-06-03 16:52:52 -05:00
Jack Nagel
873d9766ae Allow explicit conversion of requirements to deps
Fixes Homebrew/homebrew#19857.
2013-06-03 16:52:00 -05:00
Jack Nagel
3937d2bb84 Refactor Requirement.expand 2013-06-03 16:47:27 -05:00
Samuel John
ceb01c3124 Fix (Python) language dependency test
System python (for 2.x) does not provide `python2` binary.
So use `python` again.

For Python 3.x we still use `python3`.
2013-06-03 22:12:30 +02:00
Jack Nagel
7995363771 Remove empty test file
This breaks my test runner in weird ways.
2013-06-03 15:05:00 -05:00
Mike McQuaid
eb7efb8dd5 make erlang versions case-insensitive for bottles. 2013-06-03 20:53:00 +01:00
Samuel John
0ff6c992c3 depends_on :python Default to min vers 2.6 not 2.7
To support system python on OS X
2013-06-03 21:18:05 +02:00
Samuel John
0688991507 superenv: Work if build tool changes DEVELOPER_DIR
Some build systems still set the DEVELOPER_DIR to /Developer
and then nothing works any more (xcrun, xcodebuild etc.)
I am looking at you MacVim.
2013-06-03 17:29:43 +02: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
Jack Nagel
9647954a60 Allow gcc-4.2 in HOMEBREW_CC
Fixes:

$ HOMEBREW_CC=gcc brew irb
...
irb(main):001:0> require 'superenv'
=> true
irb(main):002:0> ENV.setup_build_environment
=> nil
irb(main):003:0> ENV.setup_build_environment
Warning: Invalid value for HOMEBREW_CC: gcc-4.2
2013-06-02 19:45:09 -05:00
Misty De Meo
ec2bc88987 InstallationError: don't search issues on < 1.8.6
open-uri on Ruby pre-1.8.6 simply will not open https URLs at all,
making it impossible to check the Github API using the same method
as Homebrew.

This may only be disabled temporarily until the issue search is
rewritten, for example to use the curl helper.
2013-06-02 18:33:45 -05:00
Jack Nagel
fae363268b Requirement: fix typo 2013-06-02 17:14:42 -05:00
Jack Nagel
2f02942a84 PostgresqlDependency: use canonical name for default formula 2013-06-02 17:14:42 -05:00
Misty De Meo
63b9031159 superenv: find Homebrew's gcc-4.2
If we're using a homebrewed gcc-4.2, xcrun may fail to find it (or,
worse, find superenv's shim instead). Explicitly add it to the PATH and
search all path elements for the requested tool.

Also make sure to specify 'gcc-4.2' as the compiler name, not plain
'gcc'. That can resolve to llvm-gcc and to gcc-4.0 on various Xcodes.
2013-06-02 14:44:27 -05:00
Mike McQuaid
bec7ff9807 Update pull request regex name to include commits. 2013-06-02 12:49:37 +01:00
Jack Nagel
a886a1b3e3 test_mach: move helper method out of global namespace 2013-06-01 19:40:26 -05:00
Jack Nagel
41af459205 Require hardware where it is needed 2013-06-01 19:38:48 -05: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
Misty De Meo
d212b360ec superenv: Improve compiler selection
This fixes superenv on Xcode 3.2.6, and also fixes C++ software with
gcc-4.2 on all Xcodes.
2013-05-27 12:56:25 -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
68b3e6f3fb Add required methods to AbstractDownloadStrategy
Fixes Homebrew/homebrew#20080.
2013-05-26 09:16:27 -05:00
Jack Nagel
95ab813b35 Fix Formula#installed_prefix logic
Due to the precedence of "and" relative to "||", this was not working as
intended; but because #version influences #prefix, the outcome was still
correct. So we can simplify this method quite a bit, and take the
opportunity to share code with #prefix.
2013-05-25 19:24:08 -05:00
Jack Nagel
8407ad2356 Add tests for Formula#installed_prefix 2013-05-25 17:19:19 -05:00
Jack Nagel
4adecd73b6 tests: extract common formula helper 2013-05-25 17:19:18 -05:00
Jack Nagel
05f92b5c98 build: expand dependencies only once
Closes Homebrew/homebrew#20081.
2013-05-25 15:27:10 -05:00
Jack Nagel
12158b201d build: expand requirements only once 2013-05-25 15:26:55 -05:00
Jack Nagel
f264d5a93c build: make deps an attribute of Build 2013-05-25 15:26:55 -05:00
Jack Nagel
67694b8c60 build: move build methods into a class 2013-05-25 15:26:55 -05:00
Jack Nagel
439a2f4fae Dependency: use instanceof? in eql?
This matches the eql? definition for requirements.
2013-05-25 14:25:24 -05:00
Mike McQuaid
a75aff246e Remove cat_without_underscores bottle methods. 2013-05-25 16:02:18 +01: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
92857a7bd8 Define inspect on Option and Options 2013-05-24 10:56:02 -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