aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
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