ansible: fix --HEAD install

This commit is contained in:
Misty De Meo 2014-05-01 09:08:37 -07:00
parent 01ab6087f5
commit 87cef033f9

View file

@ -46,6 +46,9 @@ class Ansible < Formula
def install
ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
# HEAD additionally requires this to be present in PYTHONPATH, or else
# ansible's own setup.py will fail.
ENV.prepend_create_path 'PYTHONPATH', prefix+'lib/python2.7/site-packages'
install_args = [ "setup.py", "install", "--prefix=#{libexec}" ]
# pycrypto's C bindings use flags unrecognized by clang,
@ -70,6 +73,13 @@ class Ansible < Formula
system "python", "setup.py", "install", "--prefix=#{prefix}"
# HEAD version installs some conflicting extra cruft
if build.head?
rm Dir["#{bin}/easy_install*"]
rm "#{lib}/python2.7/site-packages/site.py"
rm Dir["#{lib}/python2.7/site-packages/*.pth"]
end
man1.install Dir['docs/man/man1/*.1']
bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])