aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-29 12:55:26 -0700
committerAdam Vandenberg2010-07-03 21:55:33 -0700
commit96a487c54a66bd8ec7f4f62d53cb1616fc37ea02 (patch)
tree7317da7cea4baed900b0d90da5bb6be8e4180ba9 /Library/Formula
parentacd49f721fca4d7ca495e188899dea874ec35a1e (diff)
downloadhomebrew-96a487c54a66bd8ec7f4f62d53cb1616fc37ea02.tar.bz2
Add formula for Distribute for Python.
"Distribute" is a "setuptools" replacement for Python, and is a prequisite for "pip". Homebrew suggests using pip to install Python modules required by a few brews. This brew, by design, will only install against a Homebrew-built version of Python, with instructions for installing distribute against a custom Python.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/distribute.rb45
1 files changed, 45 insertions, 0 deletions
diff --git a/Library/Formula/distribute.rb b/Library/Formula/distribute.rb
new file mode 100644
index 000000000..51c85ee6c
--- /dev/null
+++ b/Library/Formula/distribute.rb
@@ -0,0 +1,45 @@
+require 'formula'
+
+class Distribute <Formula
+ url 'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.13.tar.gz'
+ homepage 'http://pypi.python.org/pypi/distribute/0.6.13'
+ md5 '43460b429e86bf0da2bb18574d63ec0c'
+
+ def caveats
+ <<-EOS.undent
+ This formula is only meant to be used against a Homebrew-built Python.
+ It will install itself directly into Python's location in the Cellar.
+ EOS
+ end
+
+ def install
+ python = Formula.factory("python")
+ unless python.installed?
+ onoe "The Distribute brew is only meant to be used against a Homebrew-built Python."
+ puts <<-EOS
+ Homebrew's "distribute" formula is only meant to be installed against a Homebrew-
+ built version of Python, but we couldn't find such a version.
+
+ The system-provided Python comes with "easy_install" already installed, with the
+ caveat that some Python packages don't install cleanly against Apple's customized
+ versions of Python.
+
+ To install distribute against a custom Python, download distribute from:
+ http://pypi.python.org/pypi/distribute
+ unzip, and run:
+ /path/to/custom/python setup.py install
+ EOS
+ exit 99
+ end
+
+ system "#{python.bin}/python", "setup.py", "install",
+ "--install-scripts", bin,
+ "--install-purelib", python.site_packages,
+ "--install-platlib", python.site_packages
+
+ (prefix+"README.homebrew").write <<-EOF
+distribute's libraries were installed directly into:
+ #{python.site_packages}
+EOF
+ end
+end