aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2013-08-08 11:30:46 -0700
committerAdam Vandenberg2013-09-11 22:05:32 -0700
commitf522abb6401d0b4ff2f054d4028cf62a6659a954 (patch)
tree65b88ddb76f783c34ceaecfe8e9dc26f61ab6465 /Library/Formula/python3.rb
parent3efa73d432f815a13caec6774d21f2dbf7d28caa (diff)
downloadhomebrew-f522abb6401d0b4ff2f054d4028cf62a6659a954.tar.bz2
python3: use resources
Diffstat (limited to 'Library/Formula/python3.rb')
-rw-r--r--Library/Formula/python3.rb25
1 files changed, 12 insertions, 13 deletions
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index f5c49f708..506068d2e 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -4,17 +4,6 @@ require 'formula'
# It's somewhat incompatible with Python 2.x, therefore, the executable
# "python" will always point to the 2.x version which you can get by
# `brew install python`.
-
-class Setuptools < Formula
- url 'https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.4.tar.gz'
- sha1 'b8bf9c2b8a114045598f0e16681d6a63a4d6cdf9'
-end
-
-class Pip < Formula
- url 'https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz'
- sha1 '9766254c7909af6d04739b4a7732cc29e9a48cb0'
-end
-
class Python3 < Formula
homepage 'http://www.python.org/'
url 'http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2'
@@ -40,6 +29,16 @@ class Python3 < Formula
skip_clean "bin/pip3", "bin/pip-#{VER}"
skip_clean "bin/easy_install3", "bin/easy_install-#{VER}"
+ resource 'setuptools' do
+ url 'https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.4.tar.gz'
+ sha1 'b8bf9c2b8a114045598f0e16681d6a63a4d6cdf9'
+ end
+
+ resource 'pip' do
+ url 'https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz'
+ sha1 '9766254c7909af6d04739b4a7732cc29e9a48cb0'
+ end
+
def patches
DATA if build.with? 'brewed-tk'
end
@@ -155,10 +154,10 @@ class Python3 < Formula
setup_args = [ "-s", "setup.py", "install", "--force", "--verbose",
"--install-scripts=#{bin}", "--install-lib=#{site_packages}" ]
- Setuptools.new.brew { system py.binary, *setup_args }
+ resource('setuptools').stage { system py.binary, *setup_args }
mv bin/'easy_install', bin/'easy_install3'
- Pip.new.brew { system py.binary, *setup_args }
+ resource('pip').stage { system py.binary, *setup_args }
mv bin/'pip', bin/'pip3'
# And now we write the distutils.cfg