91 lines
3.6 KiB
Ruby
91 lines
3.6 KiB
Ruby
class SphinxDoc < Formula
|
|
desc "Tool to create intelligent and beautiful documentation"
|
|
homepage "http://sphinx-doc.org"
|
|
url "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.4.1.tar.gz"
|
|
sha256 "c6871a784d24aba9270b6b28541537a57e2fcf4d7c799410eba18236bc76d6bc"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "f102d4389e05908e62f52b18f056d66b9de780c83fb070ca2092440acd1a0406" => :el_capitan
|
|
sha256 "1d0085423c3d43892f56c34f47367bcca6567ba1023b408a32273e16b07156f2" => :yosemite
|
|
sha256 "6373f8b2f92ea13c656af5349eb03ee6ae54e6b19b3db2f402e6d7fccc62e33c" => :mavericks
|
|
end
|
|
|
|
keg_only <<-EOS.undent
|
|
This formula is mainly used internally by other formulae.
|
|
Users are advised to use `pip` to install sphinx-doc.
|
|
EOS
|
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
resource "alabaster" do
|
|
url "https://pypi.python.org/packages/46/01/3539c406b47b0e44464a2b6c7b51871300d815b9d7b07c98309c9270bd50/alabaster-0.7.8.tar.gz"
|
|
sha256 "a1cb1b94fcc192ff74ca212d6ef5cb543bb169cfe7991c2b9df256bb354c1fff"
|
|
end
|
|
|
|
resource "Babel" do
|
|
url "https://pypi.python.org/packages/6e/96/ba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114/Babel-2.3.4.tar.gz"
|
|
sha256 "c535c4403802f6eb38173cd4863e419e2274921a01a8aad8a5b497c131c62875"
|
|
end
|
|
|
|
resource "docutils" do
|
|
url "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz"
|
|
sha256 "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
|
|
end
|
|
|
|
resource "imagesize" do
|
|
url "https://pypi.python.org/packages/53/72/6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826/imagesize-0.7.1.tar.gz"
|
|
sha256 "0ab2c62b87987e3252f89d30b7cedbec12a01af9274af9ffa48108f2c13c6062"
|
|
end
|
|
|
|
resource "Jinja2" do
|
|
url "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz"
|
|
sha256 "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4"
|
|
end
|
|
|
|
resource "MarkupSafe" do
|
|
url "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz"
|
|
sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3"
|
|
end
|
|
|
|
resource "Pygments" do
|
|
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.1.3.tar.gz"
|
|
sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81"
|
|
end
|
|
|
|
resource "pytz" do
|
|
url "https://pypi.python.org/packages/f4/7d/7c0c85e9c64a75dde11bc9d3e1adc4e09a42ce7cdb873baffa1598118709/pytz-2016.4.tar.bz2"
|
|
sha256 "ee7c751544e35a7b7fb5e3fb25a49dade37d51e70a93e5107f10575d7102c311"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz"
|
|
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
|
end
|
|
|
|
resource "snowballstemmer" do
|
|
url "https://pypi.python.org/packages/source/s/snowballstemmer/snowballstemmer-1.2.1.tar.gz"
|
|
sha256 "919f26a68b2c17a7634da993d91339e288964f93c274f1343e3bbbe2096e1128"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
resources.each do |r|
|
|
r.stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
end
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
end
|
|
|
|
test do
|
|
system bin/"sphinx-quickstart", "-pPorject", "-aAuthor", "-v1.0", "-q"
|
|
system bin/"sphinx-build", testpath, testpath/"build"
|
|
assert File.exist?("build/index.html")
|
|
end
|
|
end
|