aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz2014-03-17 16:30:47 +0100
committerJack Nagel2014-03-21 19:49:42 -0500
commita46be6e4c01b00d602f6ffb32bc2114f9eafee1d (patch)
treed1133f8e5aa118b1df339e14dc7fad30a31b0137 /Library/Formula/python3.rb
parent756a0834100914787d3ac172a2653e41b31aa445 (diff)
downloadhomebrew-a46be6e4c01b00d602f6ffb32bc2114f9eafee1d.tar.bz2
python3 3.4
The 2to3 tool needs to be removed because python2 also installs it. pip and setuptools are bundled with python3. The setuptools package may be removed in a future version, the caveats don't mention it. Closes #27636. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/python3.rb')
-rw-r--r--Library/Formula/python3.rb32
1 files changed, 9 insertions, 23 deletions
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index f16db123d..a2a05cf73 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -2,10 +2,10 @@ require 'formula'
class Python3 < Formula
homepage 'http://www.python.org/'
- url 'http://python.org/ftp/python/3.3.5/Python-3.3.5.tgz'
- sha1 '15f24702c5ae07d364606c663e515c1d9ba58615'
+ url 'http://python.org/ftp/python/3.4.0/Python-3.4.0.tgz'
+ sha1 'bb5125d1c437caa5a62e0a3d0fee298e91196d6f'
- VER='3.3' # The <major>.<minor> is used so often.
+ VER='3.4' # The <major>.<minor> is used so often.
head 'http://hg.python.org/cpython', :using => :hg, :branch => VER
@@ -26,16 +26,6 @@ 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-2.2.tar.gz'
- sha1 '547eff11ea46613e8a9ba5b12a89c1010ecc4e51'
- end
-
- resource 'pip' do
- url 'https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz'
- sha1 '35ccb7430356186cf253615b70f8ee580610f734'
- end
-
patch :DATA if build.with? 'brewed-tk'
def site_packages_cellar
@@ -146,14 +136,8 @@ class Python3 < Formula
rm_rf Dir[HOMEBREW_PREFIX/"lib/python#{VER}/site-packages/setuptools*"]
rm_rf Dir[HOMEBREW_PREFIX/"lib/python#{VER}/site-packages/distribute*"]
- setup_args = [ "-s", "setup.py", "install", "--force", "--verbose",
- "--install-scripts=#{bin}", "--install-lib=#{site_packages}" ]
-
- resource('setuptools').stage { system "#{bin}/python3", *setup_args }
- mv bin/'easy_install', bin/'easy_install3'
-
- resource('pip').stage { system "#{bin}/python3", *setup_args }
- mv bin/'pip', bin/'pip3'
+ # Install the bundled pip if it's newer than the installed version
+ system bin/"python3", "-m", "ensurepip", "--upgrade"
# And now we write the distutils.cfg
cfg = prefix/"Frameworks/Python.framework/Versions/#{VER}/lib/python#{VER}/distutils/distutils.cfg"
@@ -170,6 +154,9 @@ class Python3 < Formula
# https://github.com/Homebrew/homebrew/issues/15943
["Headers", "Python", "Resources"].each{ |f| rm(prefix/"Frameworks/Python.framework/#{f}") }
rm prefix/"Frameworks/Python.framework/Versions/Current"
+
+ # Remove 2to3 because python2 also installs it
+ rm bin/"2to3"
end
def distutils_fix_superenv(args)
@@ -275,8 +262,7 @@ class Python3 < Formula
def caveats
text = <<-EOS.undent
- Setuptools and Pip have been installed. To update them
- pip3 install --upgrade setuptools
+ Pip has been installed. To update it
pip3 install --upgrade pip
You can install Python packages with