Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Sphinx 1.3 formula.

Sphinx is a tool that makes it easy to create intelligent and
beautiful documentation, written by Georg Brandl and licensed
under the BSD license.
  • Loading branch information...
commit a34c4476654501aaddd620b30563248fb805fe13 1 parent 5cde4c6
@fbriol authored
Showing with 35 additions and 0 deletions.
  1. +35 −0 Library/Formula/sphinx-python.rb
View
35 Library/Formula/sphinx-python.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
+# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
+
+class SphinxPython < Formula
+ homepage 'http://sphinx.pocoo.org/'
+ url 'http://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.1.3.tar.gz'
+ md5 '8f55a6d4f87fc6d528120c5d1f983e98'
+
+ def install
+ dir="#{prefix}/#{site_package_dir}"
+ ENV["PYTHONPATH"] = "#{dir}:" + ENV["PYTHONPATH"]
+ FileUtils.mkdir_p dir
+ system "python setup.py build"
+ system "python setup.py install --prefix=#{prefix}"
+ end
+
+ def which_python
+ "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
+ end
+
+ def site_package_dir
+ "lib/#{which_python}/site-packages"
+ end
+
+ def caveats
+ <<-EOS
+Sphinx Python modules have been linked to:
+ #{HOMEBREW_PREFIX}/#{site_package_dir}
+
+Make sure this folder is on your PYTHONPATH.
+ EOS
+ end
+end

0 comments on commit a34c447

Please sign in to comment.
Something went wrong with that request. Please try again.