92 lines
3.7 KiB
Ruby
92 lines
3.7 KiB
Ruby
class SphinxDoc < Formula
|
|
desc "Tool to create intelligent and beautiful documentation"
|
|
homepage "http://sphinx-doc.org"
|
|
url "https://files.pythonhosted.org/packages/8b/78/eeea2b837f911cdc301f5f05163f9729a2381cadd03ccf35b25afe816c90/Sphinx-1.4.5.tar.gz"
|
|
sha256 "c5df65d97a58365cbf4ea10212186a9a45d89c61ed2c071de6090cdf9ddb4028"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "8c3d7b063e9008dec5514fc43744f92bf9b8ac92703c497d8e82f818a45e114a" => :sierra
|
|
sha256 "6973f0a6dac17b26f63ccdec98888aeefa4cef48a0e4d81e5f2d86bbbfc1cc3f" => :el_capitan
|
|
sha256 "1ec4ce94c7d0b183616fcc19eb15ca4b8f83dde00bac2dbb9aa6194eeeddac3a" => :yosemite
|
|
sha256 "9789199ec50d6669c0d762d8789c3815fb5ff4bfcf4d2d5af1a72c98f2623041" => :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://files.pythonhosted.org/packages/f7/c7/08e54702c74baf9d8f92d0bc331ecabf6d66a56f6d36370f0a672fc6a535/pytz-2016.6.1.tar.bz2"
|
|
sha256 "b5aff44126cf828537581e534cc94299b223b945a2bb3b5434d37bf8c7f3a10c"
|
|
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
|