2009-07-30 01:25:18 +00:00
|
|
|
require 'brewkit'
|
|
|
|
|
|
|
|
class Python <Formula
|
|
|
|
@url='http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2'
|
|
|
|
@homepage='http://www.python.org/'
|
|
|
|
@md5='245db9f1e0f09ab7e0faaa0cf7301011'
|
|
|
|
|
2009-08-01 18:44:16 +00:00
|
|
|
def deps
|
|
|
|
# You can build Python without readline, but you really don't want to.
|
|
|
|
LibraryDep.new 'readline'
|
|
|
|
end
|
2009-08-03 22:22:04 +00:00
|
|
|
|
|
|
|
def skip_clean? path
|
2009-08-10 10:45:25 +00:00
|
|
|
path == bin+'python' or path == bin+'python2.6' or # if you strip these, it can't load modules
|
|
|
|
path == lib+'python2.6' # save a lot of time
|
2009-08-03 22:22:04 +00:00
|
|
|
end
|
2009-08-01 18:44:16 +00:00
|
|
|
|
2009-07-30 01:25:18 +00:00
|
|
|
def install
|
2009-08-03 22:22:04 +00:00
|
|
|
system "./configure --prefix='#{prefix}' --with-framework-name=/Developer/SDKs/MacOSX10.5.sdk"
|
2009-07-30 01:25:18 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2009-08-03 22:22:04 +00:00
|
|
|
|
|
|
|
# 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'
|
2009-07-30 01:25:18 +00:00
|
|
|
end
|
|
|
|
end
|