Skip to content

Commit

Permalink
python3: only apply xcode-stubs patch for stable (#1500)
Browse files Browse the repository at this point in the history
* python3: only apply xcode-stubs.diff on stable

Closes #1499.

* python3: use #{pkgshare} to eliminate audit error
  • Loading branch information
rodrigc authored and DomT4 committed May 28, 2016
1 parent b0da7d9 commit c04d900
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions Formula/python3.rb
@@ -1,8 +1,21 @@
class Python3 < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org/"
url "https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz"
sha256 "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"

head "https://hg.python.org/cpython", :using => :hg

stable do
url "https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz"
sha256 "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"

# Fix extension module builds against Xcode 7 SDKs
# https://github.com/Homebrew/homebrew/issues/41085
# https://bugs.python.org/issue25136
patch do
url "https://bugs.python.org/file40478/xcode-stubs.diff"
sha256 "029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12"
end
end

bottle do
revision 3
Expand All @@ -11,8 +24,6 @@ class Python3 < Formula
sha256 "228380b8fb1ed6f496c6b071443ecdf98b1130aa840a4e2bd9ccae3dc7bb2713" => :mavericks
end

head "https://hg.python.org/cpython", :using => :hg

option :universal
option "with-tcl-tk", "Use Homebrew's Tk instead of OS X Tk (has optional Cocoa and threads support)"
option "with-quicktest", "Run `make quicktest` after the build"
Expand Down Expand Up @@ -57,14 +68,6 @@ class Python3 < Formula
# X11.
patch :DATA if build.with? "tcl-tk"

# Fix extension module builds against Xcode 7 SDKs
# https://github.com/Homebrew/homebrew/issues/41085
# https://bugs.python.org/issue25136
patch do
url "https://bugs.python.org/file40478/xcode-stubs.diff"
sha256 "029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12"
end

def lib_cellar
prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}"
end
Expand Down Expand Up @@ -175,7 +178,7 @@ def install
# Tell Python not to install into /Applications (default for framework builds)
system "make", "install", "PYTHONAPPSDIR=#{prefix}"
# Demos and Tools
system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{share}/python3"
system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}"
system "make", "quicktest" if build.with? "quicktest"

# Any .app get a " 3" attached, so it does not conflict with python 2.x.
Expand Down

0 comments on commit c04d900

Please sign in to comment.