pil: Uninstall correctly.
Installs now into the cellar, so that uninstall works. Closes Homebrew/homebrew#16558. Signed-off-by: Adam Vandenberg <flangy@gmail.com>master
parent
2f541bb449
commit
1f02e20516
|
@ -46,8 +46,24 @@ class Pil < Formula
|
|||
"add_directory(include_dirs, \"#{HOMEBREW_PREFIX}/include\")"
|
||||
end
|
||||
|
||||
system "python", "setup.py", "build_ext"
|
||||
system "python", "setup.py", "install", "--prefix=#{prefix}"
|
||||
# In order to install into the Cellar, the dir must exist and be in the
|
||||
# PYTHONPATH.
|
||||
temp_site_packages = lib/which_python/'site-packages'
|
||||
mkdir_p temp_site_packages
|
||||
ENV['PYTHONPATH'] = temp_site_packages
|
||||
args = [
|
||||
"--no-user-cfg",
|
||||
"--verbose",
|
||||
"install",
|
||||
"--force",
|
||||
"--install-scripts=#{share}/python",
|
||||
"--install-lib=#{temp_site_packages}",
|
||||
"--install-data=#{share}",
|
||||
"--install-headers=#{include}",
|
||||
"--record=installed-files.txt"
|
||||
]
|
||||
system "python", "-s", "setup.py", *args
|
||||
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
|
@ -56,6 +72,10 @@ class Pil < Formula
|
|||
the build will fail.
|
||||
EOS
|
||||
end
|
||||
|
||||
def which_python
|
||||
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Reference in New Issue