From f522abb6401d0b4ff2f054d4028cf62a6659a954 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 8 Aug 2013 11:30:46 -0700 Subject: python3: use resources --- Library/Formula/python3.rb | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'Library/Formula/python3.rb') 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 -- cgit v1.2.3