aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2009-08-03 15:22:04 -0700
committerMax Howell2009-08-10 18:11:23 +0100
commit320c05133eb4a87c963712f6033f97e083c1d17d (patch)
treeb4885d1a1b5b96af404ab2da75866651a694c1d6 /Library/Formula/python.rb
parentc3df8f772399d1364f0056bbd74a8c153cb45b41 (diff)
downloadhomebrew-320c05133eb4a87c963712f6033f97e083c1d17d.tar.bz2
Updated Python recipe
No longer strips the main Python executable, as that was breaking the ability of dlopen() and thus import .so based modules. This change depends on changes to keg & formula that allow files to not be cleaned. Also, replaced a duplicate libpython2.6.a with a link (saves 6MB.)
Diffstat (limited to 'Library/Formula/python.rb')
-rw-r--r--Library/Formula/python.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index ea3da4a25..6118ad716 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -9,11 +9,18 @@ class Python <Formula
# You can build Python without readline, but you really don't want to.
LibraryDep.new 'readline'
end
+
+ def skip_clean? path
+ return path == bin+'python' or path == bin+'python2.6'
+ end
def install
- # Todo: Link against custom readline
- system "./configure --prefix='#{prefix}'"
+ system "./configure --prefix='#{prefix}' --with-framework-name=/Developer/SDKs/MacOSX10.5.sdk"
system "make"
system "make install"
+
+ # lib/python2.6/config contains a copy of libpython.a; make this a link instead
+ (lib+'python2.6/config/libpython2.6.a').unlink
+ (lib+'python2.6/config/libpython2.6.a').make_link lib+'libpython2.6.a'
end
end