diff options
| author | Adam Vandenberg | 2010-08-01 17:43:47 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-01 17:43:47 -0700 |
| commit | 29b2b22c5291954dc32824cebad686895747bf44 (patch) | |
| tree | d9bace740a52ee3d6e9fac986a221d1f2d814279 /Library | |
| parent | 4f9f60fd67cfff2bcffecfc868c1ed814b913e55 (diff) | |
| download | homebrew-29b2b22c5291954dc32824cebad686895747bf44.tar.bz2 | |
Bazaar - add --system option to force use of /usr/bin/python
* brew install --system bzr to force use of system Python
* Warn if the Python being used to install is 2.7.x
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/bazaar.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Library/Formula/bazaar.rb b/Library/Formula/bazaar.rb index 37ec66de1..2b01e6994 100644 --- a/Library/Formula/bazaar.rb +++ b/Library/Formula/bazaar.rb @@ -4,7 +4,7 @@ class Bazaar <Formula url 'http://launchpadlibrarian.net/41811693/bzr-2.1.1.tar.gz' md5 'ab6b5e0cc449b27abac2b4d717afe09d' homepage 'http://bazaar-vcs.org/' - + aka :bzr def options @@ -12,8 +12,19 @@ class Bazaar <Formula end def install - ENV.prepend "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin", ":" if ARGV.include? "--system" - + if ARGV.include? "--system" + ENV.prepend "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin", ":" + else + python_version = `python -c "import sys;print sys.version"` + if python_version[0,4] == "2.7." + opoo <<-EOS +Bazaar might not yet work with Python 2.7. +You can force an installation using the system Python by doing: + brew install bazaar --system +EOS + end + end + # Find the archs of the Python we are building against. # If the python includes PPC support, then don't use Intel- # specific compiler flags @@ -25,6 +36,7 @@ class Bazaar <Formula man1.install gzip('man1/bzr.1') system "make" + inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" if ARGV.include? "--system" libexec.install ['bzr', 'bzrlib'] bin.mkpath |
