sphinx-doc: move to Python 3
This commit is contained in:
parent
126f03f735
commit
897efa4e22
1 changed files with 6 additions and 20 deletions
|
@ -1,8 +1,11 @@
|
||||||
class SphinxDoc < Formula
|
class SphinxDoc < Formula
|
||||||
|
include Language::Python::Virtualenv
|
||||||
|
|
||||||
desc "Tool to create intelligent and beautiful documentation"
|
desc "Tool to create intelligent and beautiful documentation"
|
||||||
homepage "https://www.sphinx-doc.org/"
|
homepage "https://www.sphinx-doc.org/"
|
||||||
url "https://files.pythonhosted.org/packages/4d/ed/4595274b5c9ce53a768cc0804ef65fd6282c956b93919a969e98d53894e4/Sphinx-1.8.3.tar.gz"
|
url "https://files.pythonhosted.org/packages/4d/ed/4595274b5c9ce53a768cc0804ef65fd6282c956b93919a969e98d53894e4/Sphinx-1.8.3.tar.gz"
|
||||||
sha256 "c4cb17ba44acffae3d3209646b6baec1e215cad3065e852c68cc569d4df1b9f8"
|
sha256 "c4cb17ba44acffae3d3209646b6baec1e215cad3065e852c68cc569d4df1b9f8"
|
||||||
|
revision 1
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
cellar :any_skip_relocation
|
cellar :any_skip_relocation
|
||||||
|
@ -16,14 +19,9 @@ class SphinxDoc < Formula
|
||||||
Users are advised to use `pip` to install sphinx-doc
|
Users are advised to use `pip` to install sphinx-doc
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
depends_on "python@2" if MacOS.version <= :snow_leopard
|
depends_on "python"
|
||||||
|
|
||||||
# generated from sphinx, setuptools, numpydoc and python-docs-theme
|
|
||||||
resource "setuptools" do
|
|
||||||
url "https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip"
|
|
||||||
sha256 "3b474dad69c49f0d2d86696b68105f3a6f195f7ab655af12ef9a9c326d2b08f8"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
# generated from sphinx, numpydoc and python-docs-theme
|
||||||
resource "alabaster" do
|
resource "alabaster" do
|
||||||
url "https://files.pythonhosted.org/packages/cc/b4/ed8dcb0d67d5cfb7f83c4d5463a7614cb1d078ad7ae890c9143edebbf072/alabaster-0.7.12.tar.gz"
|
url "https://files.pythonhosted.org/packages/cc/b4/ed8dcb0d67d5cfb7f83c4d5463a7614cb1d078ad7ae890c9143edebbf072/alabaster-0.7.12.tar.gz"
|
||||||
sha256 "a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"
|
sha256 "a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"
|
||||||
|
@ -130,24 +128,12 @@ class SphinxDoc < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
def install
|
def install
|
||||||
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
virtualenv_install_with_resources
|
||||||
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
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
system bin/"sphinx-quickstart", "-pPorject", "-aAuthor", "-v1.0", "-q", testpath
|
system bin/"sphinx-quickstart", "-pPorject", "-aAuthor", "-v1.0", "-q", testpath
|
||||||
system bin/"sphinx-build", testpath, testpath/"build"
|
system bin/"sphinx-build", testpath, testpath/"build"
|
||||||
assert_predicate testpath/"build/index.html", :exist?
|
assert_predicate testpath/"build/index.html", :exist?
|
||||||
assert_predicate libexec/"vendor/lib/python2.7/site-packages/python_docs_theme", :exist?
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue