Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 35 additions and 0 deletions. Show diff stats Hide diff stats

  1. +35 0 Library/Formula/sphinx-python.rb
35 Library/Formula/sphinx-python.rb
... ... @@ -0,0 +1,35 @@
  1 +require 'formula'
  2 +
  3 +# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
  4 +# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
  5 +
  6 +class SphinxPython < Formula
  7 + homepage 'http://sphinx.pocoo.org/'
  8 + url 'http://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.1.3.tar.gz'
  9 + md5 '8f55a6d4f87fc6d528120c5d1f983e98'
  10 +
  11 + def install
  12 + dir="#{prefix}/#{site_package_dir}"
  13 + ENV["PYTHONPATH"] = "#{dir}:" + ENV["PYTHONPATH"]
  14 + FileUtils.mkdir_p dir
  15 + system "python setup.py build"
  16 + system "python setup.py install --prefix=#{prefix}"
  17 + end
  18 +
  19 + def which_python
  20 + "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
  21 + end
  22 +
  23 + def site_package_dir
  24 + "lib/#{which_python}/site-packages"
  25 + end
  26 +
  27 + def caveats
  28 + <<-EOS
  29 +Sphinx Python modules have been linked to:
  30 + #{HOMEBREW_PREFIX}/#{site_package_dir}
  31 +
  32 +Make sure this folder is on your PYTHONPATH.
  33 + EOS
  34 + end
  35 +end

0 comments on commit a34c447

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