summaryrefslogtreecommitdiff
path: root/dev-python/sphinx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/sphinx
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/sphinx')
-rw-r--r--dev-python/sphinx/Manifest18
-rw-r--r--dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch14
-rw-r--r--dev-python/sphinx/metadata.xml15
-rw-r--r--dev-python/sphinx/sphinx-1.2.2-r1.ebuild123
-rw-r--r--dev-python/sphinx/sphinx-1.2.3-r1.ebuild125
-rw-r--r--dev-python/sphinx/sphinx-1.3.1-r2.ebuild134
-rw-r--r--dev-python/sphinx/sphinx-1.3.5-r1.ebuild136
-rw-r--r--dev-python/sphinx/sphinx-1.6.3-r4.ebuild117
-rw-r--r--dev-python/sphinx/sphinx-1.6.5-r1.ebuild117
-rw-r--r--dev-python/sphinx/sphinx-1.6.7-r1.ebuild117
-rw-r--r--dev-python/sphinx/sphinx-1.7.5-r1.ebuild96
11 files changed, 1012 insertions, 0 deletions
diff --git a/dev-python/sphinx/Manifest b/dev-python/sphinx/Manifest
new file mode 100644
index 000000000000..c8c885bf9d61
--- /dev/null
+++ b/dev-python/sphinx/Manifest
@@ -0,0 +1,18 @@
+AUX sphinx-1.5.1-fix-pycode-grammar.patch 525 BLAKE2B 67e574e914162110cb5cd59dd9cfc12abd1d2f35df556b90f163de57f7c1787bcf189b607792cc7002ad0d4d865e39d4739effe69e766954916cfd9ec4d6a8cb SHA512 9aae50a1089fc64fd0bf11890e08cc2d22f14adcb191985925811d819bcb59031fcb91e9281171ed11849644e277aadecf9b98c1b3cc2347e1cb6daa9032e3dd
+DIST Sphinx-1.2.2.tar.gz 3143671 BLAKE2B a21b2a060363ac86832a6a28a623ed410ff0bb39ca3c9c58618ade88f4305996e54c559bb588c518597e31a73fc16e0c37fc57950eb077179f03715dfee72729 SHA512 44073c215f9d0e7f6c7bc91cb85b0508a96e5cfff5f940fef86e2fc6f11281d03b54e87e51e5a99a23e96b470a93f3af86a6a3ab7c317c747406c55b4c37791c
+DIST Sphinx-1.2.3.tar.gz 3200548 BLAKE2B 42033c59e6e38247af12c78cb4f69c73b1dfa883aa8a9e6c180bb74de666b45faef24a55c0bfd3aa1f22bf3e632e0e95016eb1bea54e8b5ebc7df78756763b5c SHA512 00346516e826a65145a3a7fd25ef7cee569ae7fdcc0c1bec3a7301fc08d5d8730d02eee792c3efedfcac17e712ea7e2ad70ea1fcdedc11720ad54f6bcb51ad05
+DIST Sphinx-1.3.1.tar.gz 3469782 BLAKE2B ae2fa602a7873e6ef735decc2dcdd5a2632b848bb8394ee80b4215e21bfe625645fbf905a6661c333ad062e17f15b6f2c39027b44ad827f66c6467a78e8c4490 SHA512 8b92b69c4ced242c5e608ea03a7a061b0d2908f34f3150048ff4ce08b5d56be4a642a6aec13fa249ff8208fa8dd2d38d8a10d37ebbcc68385ee51f527ede0b94
+DIST Sphinx-1.3.5.tar.gz 3679978 BLAKE2B 2a88859bfd4a3de75a7b56fce65086e1239c3c58730280df078b3f76d368028a124aa6d4ca65c40773efa4c1a83dd047ea0d647582057c63bf82dadb5f2549e9 SHA512 90eda9cdbd24575d9f763e5c35e176d9970d1c83dd06dd41e9137f5c6035738fd21c4c57ff98810fc8adf91fa625192e6534bf0bbf70e78cc98f73df59eaabbc
+DIST Sphinx-1.6.3.tar.gz 4674251 BLAKE2B ba13de3d72fbc5cbc3632a1062001ed287798efe5f04064d241b645d6e4c52c9d9c115aaae4ae7b94213bbddf595a93480788d66b3a54eac3c9fb415d007d4ca SHA512 d5aec58e19239db4e61fcd6b103fcc838d97aad5a7aaf9279ff1097791d9cd1ba245989307a2d1049c123058b84ca4e91db192a1672c040d80fafed3907736ae
+DIST Sphinx-1.6.5.tar.gz 4680974 BLAKE2B 97b0cff21985de071d29651824f2954ca4d12c5095fb8049597235c8071bccb00344e89fc4a90ca010fe79a76faf0e5ae2b09ed698f1c5bcfd8f06de64169107 SHA512 c6ba7ba639f9814867d9abaaac48d58daa9d0ea9ceae4495bdbd311856833314eade2d9df7213c0357d5eea53d525c5a1235bc977a07cc7ef82e1ff0ecb51f3d
+DIST Sphinx-1.6.7.tar.gz 4692169 BLAKE2B cde46b6e9dd2c39a592802e57becbb6f61e6d370ed08fdeb41270c8177818f48f68a6e03c174b8d70453ac6f936fa25a4c2bccbf9eb7e84a008027321db93209 SHA512 bc852d4694bf433a8a1d931bc67e4c8bf50789f833be8a338eb934325734b9fbc361c1d203ecd6e28f9c0dff5edb090556372d9403cc55d4972b18bdd4b7bfd4
+DIST Sphinx-1.7.5.tar.gz 4726802 BLAKE2B 8d828dcae1f3ebb813c5f2de8c096a3fac4ab88b424955c27592349c544b775a21703c904a54efa7f86e1967198f4950804904a82a7142a3499f33c5343506e3 SHA512 db2a8df2cdb2ed78ce2341175575c2b04a149451b2bc8a4f74ddc73e308a19d505874fdbae4e370ce48a9b1cdb4de47cdab489bc57c1b378e857d5b8d04a07b8
+EBUILD sphinx-1.2.2-r1.ebuild 3045 BLAKE2B 315adfce3238e7b3c21465cd16e9a682255df98cf1c2289e3611a946f3642a9df204952d15a5947d1db2e4edaf909457bf78fc995e9d2d7b319ed8d82bd4ab17 SHA512 74d6530a5e4db4dc519eda8e4c9958fc54eb0767b00d6a69334a7c9e515bc878781c09b20e4ea5d7a23e55f3aa3093940be58013a42ef4507cf6fa2b3109007c
+EBUILD sphinx-1.2.3-r1.ebuild 3107 BLAKE2B cad89c3205b3987a80905a95798516a9ca8d6769aa3330bb1648b3a795b32c49a90b3bdb63335f4fb35f4ff95437588c863179d4b8817dd9ad83ede7e3a1ec5c SHA512 91fab1a458af03e497be8527a9afaef1fd97a2115eef6b8e549020701460cedb1e75b3c20f4fabc132f40faeb59880b45d13f5a80bd2c709fb949bd4863fc214
+EBUILD sphinx-1.3.1-r2.ebuild 3463 BLAKE2B 58106fef573a7bdb9e90c67a67aab596ffaaf01aa869111d8422c2e58e0a8f8236ba326bbfa6b52652b48166e7208f652ee1330a55b6d1bb9124ecbeebbd3c5a SHA512 cdb919b247a207534a1b27e7727e00b3e8dd0eeb3c3ed3aa63f59493f1a9840277d8b053a3cff4a0db53b687ecb6ba16d0558aa0697534f7adf211887b72479f
+EBUILD sphinx-1.3.5-r1.ebuild 3577 BLAKE2B 2cb4707c8bb3e1dfec094b359cefd4d03fc2aecc626d2d4a9370dcb696ea16ee08970eb2129c11fa601a043bf7bc783a8bca8e52f04c0a3b77fa1d197feef58b SHA512 bf4e5d4d5f96d3e0114fa81cb403081a68892580c651bdd7712e0ad06b96ab7586fadaf14c83bb0fc9e5c36f06c13fee72aa4805e12895cb1eb27fb649f26248
+EBUILD sphinx-1.6.3-r4.ebuild 3426 BLAKE2B 0dcfb96abd86c6b0439250adc8004894fd653c5070a0e3a425cbaf063c6dae7da3a48d0280a2efcbd65a7d17114f2dcff27d4d970b37af8bdd498db2a79822fd SHA512 70209e8e3c8c5b463ff5320e00efd7b1761dd7e270d4991c9e43b9a360dec966a94dd83dd65ea3d0d01eb9289a4658492809109917c4490124f1822ebb7ca217
+EBUILD sphinx-1.6.5-r1.ebuild 3496 BLAKE2B 61d468b87a23ec4d6247a4ee553d3ae94060e77f7fc4caec8b009cf43ec8849cb4cad2ac43b17ea46daa2b0bc313ee16df571660c1f6015b3173cff28c54774f SHA512 bb3cbc542479b8dbd418af82b935e389fac07d19ded44fa64251c17ef26c4e5500c97aedfcac52ad341195fa278d9235874dba18044c0feb1cbe10069a86d149
+EBUILD sphinx-1.6.7-r1.ebuild 3513 BLAKE2B 60d8965d972f777f87a25fc6b458f987da321dec1dd749d8faf7d5d875ae388d00d071d0b00b09f9e5738b5b938640e2a80f0e3ecb078efebd3c9439edf9246d SHA512 a39cfc9fe463d9100c13beefc0025d8d4cdd1f23509571ad5bd867d86cd469342aa7b66a5c350cbbf7904611369868191f31239726b48af5133f7abf31028c9b
+EBUILD sphinx-1.7.5-r1.ebuild 3128 BLAKE2B 8dde52ec7e56639d79a556e715f388a393e475972307432a14417e3b7fcdeacaeda04bda5381c50f3998456431a85c777e88e88da72ac94898f9ec5784a55826 SHA512 836ee537507dae750388d14063b09ba83bf775135fe528a7bfe7e27bd20afa0f42d65cbae8777a7c756a9481a68b2af8cdbdb94ac79ef19b152a5afa48c3d816
+MISC metadata.xml 556 BLAKE2B a2689efbe3d569fa878296875f4145fdb4d83b4c4821aa636d4006b1823e5646b9cebd5341b4bc02de30985191b83461363cc892aca638e678f86a6e314dcef3 SHA512 bff6813bf9c5110c2e4f5764f911309325923cb58300c19c079d1e6de3d6c4c0bcaf4e206fa4bc11ebf54b961c7e09217310b5647029350d4f9602da6325db0c
diff --git a/dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch b/dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch
new file mode 100644
index 000000000000..e72d4d45132c
--- /dev/null
+++ b/dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch
@@ -0,0 +1,14 @@
+environment.py has been turned into a directory,
+without actually porting the code using it.
+
+--- a/sphinx/pycode/__init__.py
++++ b/sphinx/pycode/__init__.py
+@@ -352,7 +352,7 @@
+ import pprint
+ x0 = time.time()
+ # ma = ModuleAnalyzer.for_file(__file__.rstrip('c'), 'sphinx.builders.html')
+- ma = ModuleAnalyzer.for_file('sphinx/environment.py',
++ ma = ModuleAnalyzer.for_file('sphinx/environment/__init__.py',
+ 'sphinx.environment')
+ ma.tokenize()
+ x1 = time.time()
diff --git a/dev-python/sphinx/metadata.xml b/dev-python/sphinx/metadata.xml
new file mode 100644
index 000000000000..fe4bfd29c81f
--- /dev/null
+++ b/dev-python/sphinx/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">Sphinx is a tool to create documentation for Python projects (or other documents consisting of multiple reStructuredText sources).</longdescription>
+ <upstream>
+ <remote-id type="pypi">Sphinx</remote-id>
+ </upstream>
+ <use>
+ <flag name="net">enable internet capabilities</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-python/sphinx/sphinx-1.2.2-r1.ebuild b/dev-python/sphinx/sphinx-1.2.2-r1.ebuild
new file mode 100644
index 000000000000..d23a387e8cbb
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.2.2-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+MY_PN="Sphinx"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.org/project/Sphinx/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc latex test"
+
+# Split the jinja dep to allow different slots to satisfy it
+RDEPEND="
+ <dev-python/docutils-0.13[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-1.2[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ app-text/dvipng
+ )"
+DEPEND="${DEPEND}
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib > /dev/null || die
+ "${PYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
+ popd > /dev/null || die
+}
+
+python_compile_all() {
+ use doc && emake -C doc SPHINXBUILD='"${PYTHON}" "${S}/sphinx-build.py"' html
+}
+
+python_test() {
+ cp -r -l tests "${BUILD_DIR}"/ || die
+
+ if $(python_is_python3); then
+ 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
+ fi
+
+ nosetests -w "${BUILD_DIR}"/tests -v \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}
+
+replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+pkg_preinst() {
+ if replacing_python_eclass; then
+ # the old python.eclass ebuild will want to remove our pickles...
+ backup_pickle() {
+ # array to enable filename expansion
+ local pickle_name=(
+ "${D}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle
+ )
+
+ local dest=${ROOT}${pickle_name[0]#${D}}.backup
+
+ eumask_push 022
+ mkdir -p "${dest%/*}" || die
+ eumask_pop
+
+ cp -p -v "${pickle_name[0]}" "${dest}" \
+ || die "Unable to backup grammar pickle from overwriting"
+ }
+
+ python_foreach_impl backup_pickle
+ fi
+}
+
+pkg_postinst() {
+ if replacing_python_eclass; then
+ local warned
+
+ restore_pickle() {
+ local backup_name=(
+ "${ROOT}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle.backup
+ )
+ local dest=${backup_name[0]%.backup}
+
+ mv -v "${backup_name[0]}" "${dest}" \
+ || die "Unable to restore grammar pickle backup"
+ }
+
+ python_foreach_impl restore_pickle
+
+ [[ ${warned} ]] && ewarn "Please try rebuilding the package."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.2.3-r1.ebuild b/dev-python/sphinx/sphinx-1.2.3-r1.ebuild
new file mode 100644
index 000000000000..a3f6c9baf00c
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.2.3-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+MY_PN="Sphinx"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.org/project/Sphinx/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc latex test"
+
+# Portage has only >= minimum required versions of all rdeps making
+# setting of version borders unnecessary
+RDEPEND="
+ <dev-python/docutils-0.13[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ app-text/dvipng
+ )"
+DEPEND="${DEPEND}
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib > /dev/null || die
+ "${PYTHON}" -m sphinx.pycode.__init__ \
+ || die "Grammar generation failed."
+ popd > /dev/null || die
+}
+
+python_compile_all() {
+ use doc && emake -C doc SPHINXBUILD='"${PYTHON}" "${S}/sphinx-build.py"' html
+}
+
+python_test() {
+ cp -r -l tests "${BUILD_DIR}"/ || die
+
+ if $(python_is_python3); then
+ 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
+ fi
+
+ nosetests -w "${BUILD_DIR}"/tests -v \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}
+
+replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+pkg_preinst() {
+ if replacing_python_eclass; then
+ # the old python.eclass ebuild will want to remove our pickles...
+ backup_pickle() {
+ # array to enable filename expansion
+ local pickle_name=(
+ "${D}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle
+ )
+
+ local dest=${ROOT}${pickle_name[0]#${D}}.backup
+
+ eumask_push 022
+ mkdir -p "${dest%/*}" || die
+ eumask_pop
+
+ cp -p -v "${pickle_name[0]}" "${dest}" \
+ || die "Unable to backup grammar pickle from overwriting"
+ }
+
+ python_foreach_impl backup_pickle
+ fi
+}
+
+pkg_postinst() {
+ if replacing_python_eclass; then
+ local warned
+
+ restore_pickle() {
+ local backup_name=(
+ "${ROOT}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle.backup
+ )
+ local dest=${backup_name[0]%.backup}
+
+ mv -v "${backup_name[0]}" "${dest}" \
+ || die "Unable to restore grammar pickle backup"
+ }
+
+ python_foreach_impl restore_pickle
+
+ [[ ${warned} ]] && ewarn "Please try rebuilding the package."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.3.1-r2.ebuild b/dev-python/sphinx/sphinx-1.3.1-r2.ebuild
new file mode 100644
index 000000000000..13bb7fcbe9dd
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.3.1-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy)
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+MY_PN="Sphinx"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.org/project/Sphinx/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc latex test"
+
+RDEPEND="
+ =dev-python/alabaster-0.7*[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ <dev-python/docutils-0.13[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ >=dev-python/six-1.4[${PYTHON_USEDEP}]
+ >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ app-text/dvipng
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib > /dev/null || die
+ "${PYTHON}" -m sphinx.pycode.__init__ \
+ || die "Grammar generation failed."
+ popd > /dev/null || die
+}
+
+python_compile_all() {
+ use doc && emake -C doc SPHINXBUILD='"${PYTHON}" "${S}/sphinx-build.py"' html
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ export SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ cp -r -l tests "${BUILD_DIR}"/ || die
+
+ if $(python_is_python3); then
+ 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
+ fi
+
+ nosetests -w "${BUILD_DIR}"/tests -v \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}
+
+replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+pkg_preinst() {
+ if replacing_python_eclass; then
+ # the old python.eclass ebuild will want to remove our pickles...
+ backup_pickle() {
+ # array to enable filename expansion
+ local pickle_name=(
+ "${D}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle
+ )
+
+ local dest=${ROOT}${pickle_name[0]#${D}}.backup
+
+ eumask_push 022
+ mkdir -p "${dest%/*}" || die
+ eumask_pop
+
+ cp -p -v "${pickle_name[0]}" "${dest}" \
+ || die "Unable to backup grammar pickle from overwriting"
+ }
+
+ python_foreach_impl backup_pickle
+ fi
+}
+
+pkg_postinst() {
+ if replacing_python_eclass; then
+ local warned
+
+ restore_pickle() {
+ local backup_name=(
+ "${ROOT}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle.backup
+ )
+ local dest=${backup_name[0]%.backup}
+
+ mv -v "${backup_name[0]}" "${dest}" \
+ || die "Unable to restore grammar pickle backup"
+ }
+
+ python_foreach_impl restore_pickle
+
+ [[ ${warned} ]] && ewarn "Please try rebuilding the package."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.3.5-r1.ebuild b/dev-python/sphinx/sphinx-1.3.5-r1.ebuild
new file mode 100644
index 000000000000..e6be7b1317a4
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.3.5-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+MY_PN="Sphinx"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.org/project/Sphinx/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc latex test"
+
+RDEPEND="
+ =dev-python/alabaster-0.7*[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ <dev-python/docutils-0.13[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ >=dev-python/six-1.4[${PYTHON_USEDEP}]
+ >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
+ !=dev-python/Babel-2.0[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
+ <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ app-text/dvipng
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib > /dev/null || die
+ "${PYTHON}" -m sphinx.pycode.__init__ \
+ || die "Grammar generation failed."
+ popd > /dev/null || die
+}
+
+python_compile_all() {
+ use doc && emake -C doc SPHINXBUILD='"${PYTHON}" "${S}/sphinx-build.py"' html
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ export SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ cp -r -l tests "${BUILD_DIR}"/ || die
+
+ if $(python_is_python3); then
+ 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
+ fi
+
+ nosetests -w "${BUILD_DIR}"/tests -v \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}
+
+replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+pkg_preinst() {
+ if replacing_python_eclass; then
+ # the old python.eclass ebuild will want to remove our pickles...
+ backup_pickle() {
+ # array to enable filename expansion
+ local pickle_name=(
+ "${D}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle
+ )
+
+ local dest=${ROOT}${pickle_name[0]#${D}}.backup
+
+ eumask_push 022
+ mkdir -p "${dest%/*}" || die
+ eumask_pop
+
+ cp -p -v "${pickle_name[0]}" "${dest}" \
+ || die "Unable to backup grammar pickle from overwriting"
+ }
+
+ python_foreach_impl backup_pickle
+ fi
+}
+
+pkg_postinst() {
+ if replacing_python_eclass; then
+ local warned
+
+ restore_pickle() {
+ local backup_name=(
+ "${ROOT}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle.backup
+ )
+ local dest=${backup_name[0]%.backup}
+
+ mv -v "${backup_name[0]}" "${dest}" \
+ || die "Unable to restore grammar pickle backup"
+ }
+
+ python_foreach_impl restore_pickle
+
+ [[ ${warned} ]] && ewarn "Please try rebuilding the package."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.6.3-r4.ebuild b/dev-python/sphinx/sphinx-1.6.3-r4.ebuild
new file mode 100644
index 000000000000..7f1d945977a5
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.6.3-r4.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://www.sphinx-doc.org/"
+SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
+IUSE="doc latex net test"
+
+RDEPEND="
+ >=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}]
+ <dev-python/alabaster-0.8[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ dev-python/imagesize[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
+ <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-luatex
+ app-text/dvipng
+ )
+ net? (
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-cov[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ virtual/imagemagick-tools[jpeg,png,svg]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.1-fix-pycode-grammar.patch
+)
+
+python_prepare_all() {
+ # remove tests that fail due to network-sandbox
+ rm tests/test_websupport.py || die "Failed to remove web tests"
+ rm tests/test_build_linkcheck.py || die "Failed to remove web tests"
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib >/dev/null || die
+ "${EPYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
+ popd >/dev/null || die
+}
+
+python_compile_all() {
+ if use doc; then
+ emake -C doc SPHINXBUILD='"${EPYTHON}" "${S}/sphinx-build.py"' html
+ HTML_DOCS=( doc/_build/html/. )
+ fi
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ local -x SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ cp -r -l tests "${BUILD_DIR}"/ || die "Failed to copy tests"
+ cp Makefile "${BUILD_DIR}"/ || die "Failed to copy Makefile"
+ emake test
+}
+
+pkg_postinst() {
+ replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+ }
+
+ if replacing_python_eclass; then
+ ewarn "Replaced a very old sphinx version. If you are"
+ ewarn "experiencing problems, please re-emerge sphinx."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.6.5-r1.ebuild b/dev-python/sphinx/sphinx-1.6.5-r1.ebuild
new file mode 100644
index 000000000000..ad810d050f81
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.6.5-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://www.sphinx-doc.org/"
+SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="doc latex net test"
+
+RDEPEND="
+ >=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}]
+ <dev-python/alabaster-0.8[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ dev-python/imagesize[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
+ <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-luatex
+ app-text/dvipng
+ )
+ net? (
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-cov[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ virtual/imagemagick-tools[jpeg,png,svg]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.1-fix-pycode-grammar.patch
+)
+
+python_prepare_all() {
+ # remove tests that fail due to network-sandbox
+ rm tests/test_websupport.py || die "Failed to remove web tests"
+ rm tests/test_build_linkcheck.py || die "Failed to remove web tests"
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib >/dev/null || die
+ "${EPYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
+ popd >/dev/null || die
+}
+
+python_compile_all() {
+ if use doc; then
+ emake -C doc SPHINXBUILD='"${EPYTHON}" "${S}/sphinx-build.py"' html
+ HTML_DOCS=( doc/_build/html/. )
+ fi
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ local -x SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ cp -r -l tests "${BUILD_DIR}"/ || die "Failed to copy tests"
+ cp Makefile "${BUILD_DIR}"/ || die "Failed to copy Makefile"
+ emake test
+}
+
+pkg_postinst() {
+ replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+ }
+
+ if replacing_python_eclass; then
+ ewarn "Replaced a very old sphinx version. If you are"
+ ewarn "experiencing problems, please re-emerge sphinx."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.6.7-r1.ebuild b/dev-python/sphinx/sphinx-1.6.7-r1.ebuild
new file mode 100644
index 000000000000..dbbac7ab54b8
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.6.7-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 eutils versionator
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://www.sphinx-doc.org/"
+SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x86-fbsd ~x86-macos ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="doc latex net test"
+
+RDEPEND="
+ >=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}]
+ <dev-python/alabaster-0.8[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ dev-python/imagesize[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
+ <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-luatex
+ app-text/dvipng
+ )
+ net? (
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-cov[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ virtual/imagemagick-tools[jpeg,png,svg]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.1-fix-pycode-grammar.patch
+)
+
+python_prepare_all() {
+ # remove tests that fail due to network-sandbox
+ rm tests/test_websupport.py || die "Failed to remove web tests"
+ rm tests/test_build_linkcheck.py || die "Failed to remove web tests"
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib >/dev/null || die
+ "${EPYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
+ popd >/dev/null || die
+}
+
+python_compile_all() {
+ if use doc; then
+ emake -C doc SPHINXBUILD='"${EPYTHON}" "${S}/sphinx-build.py"' html
+ HTML_DOCS=( doc/_build/html/. )
+ fi
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ local -x SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ cp -r -l tests "${BUILD_DIR}"/ || die "Failed to copy tests"
+ cp Makefile "${BUILD_DIR}"/ || die "Failed to copy Makefile"
+ emake test
+}
+
+pkg_postinst() {
+ replacing_python_eclass() {
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then
+ return 0
+ fi
+ done
+
+ return 1
+ }
+
+ if replacing_python_eclass; then
+ ewarn "Replaced a very old sphinx version. If you are"
+ ewarn "experiencing problems, please re-emerge sphinx."
+ fi
+}
diff --git a/dev-python/sphinx/sphinx-1.7.5-r1.ebuild b/dev-python/sphinx/sphinx-1.7.5-r1.ebuild
new file mode 100644
index 000000000000..130b1d14f223
--- /dev/null
+++ b/dev-python/sphinx/sphinx-1.7.5-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Python documentation generator"
+HOMEPAGE="http://www.sphinx-doc.org/"
+SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x86-fbsd ~x86-macos ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="doc latex net test"
+
+RDEPEND="
+ >=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}]
+ <dev-python/alabaster-0.8[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/docutils-0.11[${PYTHON_USEDEP}]
+ dev-python/imagesize[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
+ >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
+ <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ latex? (
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-luatex
+ app-text/dvipng
+ )
+ net? (
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
+ >=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
+ virtual/imagemagick-tools[jpeg,png,svg]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${P^}"
+
+python_prepare_all() {
+ # remove tests that fail due to network-sandbox
+ rm tests/test_websupport.py || die "Failed to remove web tests"
+ rm tests/test_build_linkcheck.py || die "Failed to remove web tests"
+ sed -i -e 's:test_latex_remote_images:_&:' tests/test_build_latex.py || die
+
+ # fails when additional sphinx themes are installed
+ sed -i -e 's:test_theme_api:_&:' tests/test_theming.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ # Generate the grammar. It will be caught by install somehow.
+ # Note that the tests usually do it for us. However, I don't want
+ # to trust USE=test really running all the tests, especially
+ # with FEATURES=test-fail-continue.
+ pushd "${BUILD_DIR}"/lib >/dev/null || die
+ "${EPYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
+ popd >/dev/null || die
+}
+
+python_compile_all() {
+ if use doc; then
+ esetup.py build_sphinx
+ HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
+ fi
+}
+
+python_test() {
+ mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
+ local -x SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
+ py.test -vv || die "Tests fail with ${EPYTHON}"
+}