Commit Graph
2937 Commits
Author SHA1 Message Date
Jack Nagel b262a009ba Add failing test for patchlevel version comparisons 2013-06-05 10:06:37 -05:00
Samuel John 306a89ca3b 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 072e8f903c 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 3e38d802b7 python_helper style bit 2013-06-04 22:07:15 +02:00
Samuel John 3b1873cdb0 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 96f3f5dd98 Remove postgresql and mysql audit noise
Closes #20159.
2013-06-04 11:15:31 -05:00
Jack Nagel 0759cce3c2 Extract attr_rw from Formula for reuse
Closes #20239.
2013-06-04 11:06:18 -05:00
Samuel John af4a66b0cf 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 f1a4dad61f 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 c1ac064a41 Don't error out on unreleased OSX versions.
References #20142.
2013-06-04 13:58:08 +01:00
Jack Nagel aae86b7a84 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 5052cef024 FormulaInstaller: split up big method 2013-06-03 22:50:11 -05:00
Jack Nagel f970e6d3a5 Remove unnecessary use of instance_eval 2013-06-03 17:03:09 -05:00
Jack Nagel 072c989ea2 Revert "Remove default_formula from MPIDependency."
This reverts commit 9aaa89dbe8.
2013-06-03 16:52:52 -05:00
Jack Nagel b2972dc1f9 Allow explicit conversion of requirements to deps
Fixes #19857.
2013-06-03 16:52:00 -05:00
Jack Nagel 17bf43ef70 Refactor Requirement.expand 2013-06-03 16:47:27 -05:00
Samuel John ec65a8a15a 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 9dc4c326bf Remove empty test file
This breaks my test runner in weird ways.
2013-06-03 15:05:00 -05:00
Mike McQuaid 2abe3d7fcf make erlang versions case-insensitive for bottles. 2013-06-03 20:53:00 +01:00
Samuel John bac0d416e7 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 13321d52b5 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 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
Jack Nagel 35c46b417c 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 27ba000232 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 2609349cbe Requirement: fix typo 2013-06-02 17:14:42 -05:00
Jack Nagel e337b12f72 PostgresqlDependency: use canonical name for default formula 2013-06-02 17:14:42 -05:00
Misty De Meo b1a636c649 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 9d401d5c0e Update pull request regex name to include commits. 2013-06-02 12:49:37 +01:00
Jack Nagel 4635363e2f test_mach: move helper method out of global namespace 2013-06-01 19:40:26 -05:00
Jack Nagel b433d51586 Require hardware where it is needed 2013-06-01 19:38:48 -05:00
Adam Vandenberg 577cb5a2b2 Audit url/devel/head for redundant :using 2013-05-27 22:25:34 -07:00
Adam Vandenberg 743c8286bf Add brew search --debian <f> 2013-05-27 17:32:27 -07:00
Jack Nagel 8080d17098 audit: drop redundant 'each' after 'grep' 2013-05-27 18:31:18 -05:00
Misty De Meo 08523d9158 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 a377cad783 doctor: check git SSL settings on <= 10.5 2013-05-27 10:06:45 -05:00
Jack Nagel 95119c2deb doctor: combine git origin checks 2013-05-26 17:55:34 -05:00
Jack Nagel 1f699a6902 doctor: combine git existence and version checks 2013-05-26 17:48:12 -05:00
Jack Nagel fc3cd4d59a Add required methods to AbstractDownloadStrategy
Fixes #20080.
2013-05-26 09:16:27 -05:00
Jack Nagel d734e46667 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 54e6140a18 Add tests for Formula#installed_prefix 2013-05-25 17:19:19 -05:00
Jack Nagel ae57857ac5 tests: extract common formula helper 2013-05-25 17:19:18 -05:00
Jack Nagel c2624cd40e build: expand dependencies only once
Closes #20081.
2013-05-25 15:27:10 -05:00
Jack Nagel fec99760d7 build: expand requirements only once 2013-05-25 15:26:55 -05:00
Jack Nagel c6e638bb75 build: make deps an attribute of Build 2013-05-25 15:26:55 -05:00
Jack Nagel d948946adf build: move build methods into a class 2013-05-25 15:26:55 -05:00
Jack Nagel 253203c553 Dependency: use instanceof? in eql?
This matches the eql? definition for requirements.
2013-05-25 14:25:24 -05:00
Mike McQuaid d6dae4544f Remove cat_without_underscores bottle methods. 2013-05-25 16:02:18 +01:00
Jack Nagel a22fc2e015 doctor: style nits 2013-05-24 19:53:39 -05:00
Jack Nagel d6ecdb90a9 outdated: yield version list rather than recreate it 2013-05-24 11:13:27 -05:00
Jack Nagel 7f0b73dbc5 Define inspect on Option and Options 2013-05-24 10:56:02 -05:00