python: don't memorize Cellar paths
This commit is contained in:
parent
629832a1f4
commit
6c2880dc6f
1 changed files with 10 additions and 4 deletions
|
@ -3,7 +3,7 @@ class Python < Formula
|
|||
homepage "https://www.python.org"
|
||||
url "https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz"
|
||||
sha256 "d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
|
||||
revision 1
|
||||
revision 2
|
||||
|
||||
head "https://hg.python.org/cpython", :using => :hg, :branch => "2.7"
|
||||
|
||||
|
@ -202,9 +202,6 @@ class Python < Formula
|
|||
system "make", "quicktest", "TESTPYTHONOPTS=-s", "TESTOPTS=-j#{ENV.make_jobs} -w"
|
||||
end
|
||||
|
||||
# Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible.
|
||||
(lib/"pkgconfig").install_symlink Dir["#{frameworks}/Python.framework/Versions/Current/lib/pkgconfig/*"]
|
||||
|
||||
ENV.deparallelize do
|
||||
# Tell Python not to install into /Applications
|
||||
system "make", "install", "PYTHONAPPSDIR=#{prefix}"
|
||||
|
@ -219,6 +216,15 @@ class Python < Formula
|
|||
"-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)"
|
||||
end
|
||||
|
||||
# Prevent third-party packages from building against fragile Cellar paths
|
||||
inreplace [lib_cellar/"_sysconfigdata.py",
|
||||
lib_cellar/"config/Makefile",
|
||||
frameworks/"Python.framework/Versions/Current/lib/pkgconfig/python-2.7.pc"],
|
||||
prefix, opt_prefix
|
||||
|
||||
# Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible.
|
||||
(lib/"pkgconfig").install_symlink Dir[frameworks/"Python.framework/Versions/Current/lib/pkgconfig/*"]
|
||||
|
||||
# Remove the site-packages that Python created in its Cellar.
|
||||
site_packages_cellar.rmtree
|
||||
|
||||
|
|
Loading…
Reference in a new issue