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.xmaster
parent
f2c62d029f
commit
ad78d02e83
|
@ -12,7 +12,18 @@ 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-
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue