From 97cef6041f78e2d8a9dd6f36725ddc056a9b6e2c Mon Sep 17 00:00:00 2001 From: Qiangning Hong Date: Wed, 2 Jul 2014 14:04:05 +0800 Subject: python: add --with-docs option This option will install HTML documentation. Closes #30608. Signed-off-by: Jack Nagel --- Library/Formula/python.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula/python.rb') diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index 82bd874fb..799a84373 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -17,6 +17,7 @@ class Python < Formula option "with-brewed-tk", "Use Homebrew's Tk (has optional Cocoa and threads support)" option "with-poll", "Enable select.poll, which is not fully implemented on OS X (http://bugs.python.org/issue5154)" option "with-dtrace", "Experimental DTrace support (http://bugs.python.org/issue13405)" + option "with-docs", "Install HTML documentation" depends_on "pkg-config" => :build depends_on "readline" => :recommended @@ -29,6 +30,11 @@ class Python < Formula skip_clean "bin/pip", "bin/pip-2.7" skip_clean "bin/easy_install", "bin/easy_install-2.7" + resource "docs" do + url "https://docs.python.org/2/archives/python-2.7.8-docs-html.tar.bz2" + sha1 "125db6f107f47566e46b5c1745fec1e0dfaf95a0" + end + resource "setuptools" do url "https://pypi.python.org/packages/source/s/setuptools/setuptools-5.3.tar.gz" sha1 "da2da9324a539029ebea602120afcb8cfd24ddf6" @@ -143,6 +149,8 @@ class Python < Formula # Remove the site-packages that Python created in its Cellar. site_packages_cellar.rmtree + doc.install resource('docs') if build.with? "docs" + (libexec/'setuptools').install resource('setuptools') (libexec/'pip').install resource('pip') end -- cgit v1.2.3