aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
authorGuillaume DIDIER2014-07-19 12:48:08 +0200
committerJack Nagel2014-07-19 09:23:26 -0500
commit0005b34ed3276f71f0cc89806423c5c7b6374034 (patch)
tree4ce5091e02d1e50ca99b570470b02ed28156220c /Library/Formula/python3.rb
parentb501f4c5c9fc9ced377649868fc3d241687bb204 (diff)
downloadhomebrew-0005b34ed3276f71f0cc89806423c5c7b6374034.tar.bz2
python3: add with-docs option
Closes #30929. Closes #30947. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/python3.rb')
-rw-r--r--Library/Formula/python3.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index f30972893..4bf602120 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -18,6 +18,7 @@ class Python3 < Formula
option :universal
option 'quicktest', 'Run `make quicktest` after the build'
option 'with-brewed-tk', "Use Homebrew's Tk (has optional Cocoa and threads support)"
+ option "with-docs", "Install HTML documentation"
depends_on 'pkg-config' => :build
depends_on 'readline' => :recommended
@@ -31,6 +32,11 @@ class Python3 < Formula
skip_clean "bin/pip3", "bin/pip-#{VER}"
skip_clean "bin/easy_install3", "bin/easy_install-#{VER}"
+ resource "docs" do
+ url "https://docs.python.org/3/archives/python-3.4.1-docs-html.tar.bz2"
+ sha1 "7d76e33a98bcd7c24790309780171c75988ad82a"
+ end
+
patch :DATA if build.with? 'brewed-tk'
def site_packages_cellar
@@ -130,6 +136,8 @@ class Python3 < Formula
# Remove the site-packages that Python created in its Cellar.
site_packages_cellar.rmtree
+
+ doc.install resource("docs") if build.with? "docs"
end
def post_install