From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/sphinx/Manifest | 17 +++ .../files/sphinx-1.5.1-fix-pycode-grammar.patch | 14 +++ dev-python/sphinx/metadata.xml | 15 +++ dev-python/sphinx/sphinx-1.2.2-r1.ebuild | 123 +++++++++++++++++++ dev-python/sphinx/sphinx-1.2.3-r1.ebuild | 125 +++++++++++++++++++ dev-python/sphinx/sphinx-1.3.1-r2.ebuild | 134 ++++++++++++++++++++ dev-python/sphinx/sphinx-1.3.5-r1.ebuild | 136 +++++++++++++++++++++ dev-python/sphinx/sphinx-1.5.2.ebuild | 114 +++++++++++++++++ dev-python/sphinx/sphinx-1.6.3-r1.ebuild | 117 ++++++++++++++++++ dev-python/sphinx/sphinx-1.6.3-r2.ebuild | 117 ++++++++++++++++++ 10 files changed, 912 insertions(+) create mode 100644 dev-python/sphinx/Manifest create mode 100644 dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch create mode 100644 dev-python/sphinx/metadata.xml create mode 100644 dev-python/sphinx/sphinx-1.2.2-r1.ebuild create mode 100644 dev-python/sphinx/sphinx-1.2.3-r1.ebuild create mode 100644 dev-python/sphinx/sphinx-1.3.1-r2.ebuild create mode 100644 dev-python/sphinx/sphinx-1.3.5-r1.ebuild create mode 100644 dev-python/sphinx/sphinx-1.5.2.ebuild create mode 100644 dev-python/sphinx/sphinx-1.6.3-r1.ebuild create mode 100644 dev-python/sphinx/sphinx-1.6.3-r2.ebuild (limited to 'dev-python/sphinx') diff --git a/dev-python/sphinx/Manifest b/dev-python/sphinx/Manifest new file mode 100644 index 000000000000..4f2f5b721566 --- /dev/null +++ b/dev-python/sphinx/Manifest @@ -0,0 +1,17 @@ +AUX sphinx-1.5.1-fix-pycode-grammar.patch 525 SHA256 f861e106aef16571e26a9db8166b253c64a53e7ee6d10baac13c6354a5b81319 SHA512 9aae50a1089fc64fd0bf11890e08cc2d22f14adcb191985925811d819bcb59031fcb91e9281171ed11849644e277aadecf9b98c1b3cc2347e1cb6daa9032e3dd WHIRLPOOL 5ef43cd354e4f9167f9a64e3d04ee7aa0ce73c6dbffcd60f392f0f076ec92e68b5f99377272445182137752b44ace10780ed9a4e2960eb7553c51e69e95b4e92 +DIST Sphinx-1.2.2.tar.gz 3143671 SHA256 2d3415f5b3e6b7535877f4c84fe228bdb802a8993c239b2d02c23169d67349bd SHA512 44073c215f9d0e7f6c7bc91cb85b0508a96e5cfff5f940fef86e2fc6f11281d03b54e87e51e5a99a23e96b470a93f3af86a6a3ab7c317c747406c55b4c37791c WHIRLPOOL c5ed15b51682d3be9f8349ab838c6758cb4e25023b6ad13622d748b771594ed75f786709a25fb2d61ad245ecef0925e5bcc1aafb93fc355a0f0ea50df63efcd7 +DIST Sphinx-1.2.3.tar.gz 3200548 SHA256 94933b64e2fe0807da0612c574a021c0dac28c7bd3c4a23723ae5a39ea8f3d04 SHA512 00346516e826a65145a3a7fd25ef7cee569ae7fdcc0c1bec3a7301fc08d5d8730d02eee792c3efedfcac17e712ea7e2ad70ea1fcdedc11720ad54f6bcb51ad05 WHIRLPOOL 0c0e2e21a52829893857939f977e8312c4eac11f5d2aec3b8e4f9c8ffdbf14c4aa46a6c26dac0ad4abfe92b3bdad72a3468e6d2ff2485df6efaf3fccd17ae69b +DIST Sphinx-1.3.1.tar.gz 3469782 SHA256 1a6e5130c2b42d2de301693c299f78cc4bd3501e78b610c08e45efc70e2b5114 SHA512 8b92b69c4ced242c5e608ea03a7a061b0d2908f34f3150048ff4ce08b5d56be4a642a6aec13fa249ff8208fa8dd2d38d8a10d37ebbcc68385ee51f527ede0b94 WHIRLPOOL f3e442fd1f1c260b21f3e2381f028884b6247758448439e7be4cf784f50ec12494e384c77a0c4ccac473f25d7bb88f5424be937d72bb3fac1b6f6387a5746f66 +DIST Sphinx-1.3.5.tar.gz 3679978 SHA256 b7d133bb4990d010a2ad934c319b52d8a2156cb0491484f5e2a558619bc9ae04 SHA512 90eda9cdbd24575d9f763e5c35e176d9970d1c83dd06dd41e9137f5c6035738fd21c4c57ff98810fc8adf91fa625192e6534bf0bbf70e78cc98f73df59eaabbc WHIRLPOOL 5877015f700ed0818e0879868f2190ec818d088e235d9c12fe6bd472b0006bd8d26156273023ff93a098c8503bdc440cedd1ba8758fdc25f742bb5794940559f +DIST Sphinx-1.5.2.tar.gz 4418646 SHA256 049c48393909e4704a6ed4de76fd39c8622e165414660bfb767e981e7931c722 SHA512 32c8fb98d72e998fcce8c46ceddcbb0a0776d0e9ce75dc96cef48139b8b47ebe9636243fb48b9e04c8e1d5c56e09fc4c60248fbbef810fba9813b83a3e6cbe88 WHIRLPOOL 08fcf21ea37834e52a89f3956df289dc2ffe97e419cc0463815b3f10b95042dae5cf41be74fd1780529d5525ea349c10dd0e0bda6ac24b330ccb21e4a79e22e1 +DIST Sphinx-1.6.3.tar.gz 4674251 SHA256 af8bdb8c714552b77d01d4536e3d6d2879d6cb9d25423d29163d5788e27046e6 SHA512 d5aec58e19239db4e61fcd6b103fcc838d97aad5a7aaf9279ff1097791d9cd1ba245989307a2d1049c123058b84ca4e91db192a1672c040d80fafed3907736ae WHIRLPOOL 1b950701f72d54b7f03aa096f11ed7689ff843709b11cb61aa6fa02322e29260700693495230643fa2f07003e6411e3d00eed0463f8662b6aadfe55ab37742e4 +EBUILD sphinx-1.2.2-r1.ebuild 3048 SHA256 8ecc6c5262ab49d008ed87ef2891a3f2c97164f3491deeb5f949a1899735d613 SHA512 ae2a68a69515191020e983ce10ce740d09d472e5bf665be6bff02c9ff959d7a9fe09a346b3b51afb3b360995d24eaa277f233e336d4e15aaf0bcd764bef1050d WHIRLPOOL 1e14e0da9c97836770a12e9d838d833f452a45581982023dab4701c2869f7957fbd0051da62b4fc325752d9698d80fd9c5e94a6b78166318c00b7460ed2b3903 +EBUILD sphinx-1.2.3-r1.ebuild 3110 SHA256 86ff62da3aaf9ba3f2aeeaac16ac8799ae573604edd9001f20fe1db3775f2b51 SHA512 98a43b62068f49cdb1f8bc998836c2b65bc83a92ea0833a7971711ca4d5fef557d93d4e1d1d9b58757ca3567e2a65fbd35fe5a4409f3d5ec0d464ff0c106cf0a WHIRLPOOL e8f19433039cd262b31f6d7b16ae0e29dd6c882fe7f40043d3f68f7ed42efa8d795618f23ffeae3864162ae6af2f183ff8d112a6bbf6452d5bb37348f6c75885 +EBUILD sphinx-1.3.1-r2.ebuild 3466 SHA256 f5800dc2d2d95eb2887b04d15ef353e5a48872fa2b4f9458b57c3791cff2dde0 SHA512 0705fa10d01ec6a215e25416d65c96e407f7230c33c1e2f81ab87f55f0a162bd6c3ceb6ad5bba343eaa3cf407f97d1b570b2f7dadcec0bce2f1870f03a739eb0 WHIRLPOOL d90cd137126b11c075c927adb557b348bace9aa0a02e7893e123fd49a710385851ee130dcf61092a2028fac6ca928b17b59d96a6a72544c9df782ffb646061c8 +EBUILD sphinx-1.3.5-r1.ebuild 3580 SHA256 3a295ba622cd16a4c378efd1323d04e42f6dbc6b9b75079a5400ec2ae207fcfb SHA512 5d7a9b3e083b0f28e4774c5a51895cace0287cc581984ce5b8d4403670663b6bb79cffe1c0d516dcbf57fee8752e3723b1e18c80e5a495a7add224c2835957e9 WHIRLPOOL ad5b3f01e23f596fc4d8c9ab4528121db4e8abacf679487802afb3949dc86ed19dd308108b07ac5f5513cab06523682ba665e54cf8f13f2d98690d1237206a26 +EBUILD sphinx-1.5.2.ebuild 3424 SHA256 200fa51b786dce66e218ae45f3f6ce24405066692b8369f7c6186ab1e1754836 SHA512 65a23cf4ab228b325301ac6ac07187fa3b4000e52f36d3fcb2d29b0b2bb7e0f171b70ab008a3f3641893618fc2adcae1ceb2f8e49f6e200493ef5704a89b7428 WHIRLPOOL 1f3a74a895cd08ae485285ef6c6a4bfc8fb6ed1ac68e965940d28d3623d3a0607f29bf327716bf8f7aa894d42901049ce66b49ced6c09f08b892f691698d4d1d +EBUILD sphinx-1.6.3-r1.ebuild 3400 SHA256 a43d4f6034848a030c5cd2c76e3d8259a16a68a7c42799ecb4abd1a29cdfff03 SHA512 571647d383ade15d9484124c04ea1b75eaa24a4fb0e835a864e2c15e8c1938d89fd09b9b86cdb4d64b385c016ed6dddb88e2796e9079e7db7160d1cff6f86988 WHIRLPOOL cf2ae88534602b3abc902764e7be67a41e11b1d056b8fb875fb4c954652980c8f3172e7d4c14360e380f9554b5f153fa1228863ad81c5a735895e30b0e07d84e +EBUILD sphinx-1.6.3-r2.ebuild 3408 SHA256 64dbebfc8744fb4d8146273f04ea45bb5d4fda401b461b376824a70b7a517eba SHA512 709fd49fb62a069fb8cf1f268fcaaacf64e1ce7e705d1282d56e2958c0b4d69b0fceef1d0215da9e1dc98ae66db30cc29c564aa78d29771c0c98f122e7fa27b2 WHIRLPOOL f4f70757dd9b10367d7bdf99b17d59779e57a64f435e7e92843f3f6d433c096ff69da00b047a76e5830c21dce44653f9e4cabcb149eabb44ef4ebf2f3bb1011b +MISC ChangeLog 6428 SHA256 0ddd88197c75ce2cde0b111f2cf34ae208dddf482abc691eb477d334731bfa11 SHA512 a972e574773f6b768bb558aae26d2f10f2cf579a0702f60579c350d389301b05e92703c8f700f6771626d8bdda3db064f6f8848ca78069c7200a3c8e5b9645cd WHIRLPOOL fd416c0c19401cddd15922a47122c54cb59d0bd6c7c71b62cf9d7f36873892e494d26451a0498426261d22c4a9ccb0708feab7507e48619f21e6ce474c1bef57 +MISC ChangeLog-2015 23594 SHA256 c2a0cf0d8688ea2e6c937e39e266c466dbc78c21fc9e4c65f2537c04b61ccdbc SHA512 f1aa8cb91173dc3e8dab8d12f50e837efe55077d285f09031e48b5b9dfbacc99f9380fa7ee007a0f0e47595a1173bc568b7f701fb53816f2fa3806b88b4ecda0 WHIRLPOOL 02f43cf7ae610c7b53bec1c720d20e8a4519dfb5ad4b819964f5b337b75ad49c8c7dcf3124720538eb673dc30085e09e009c0e880853e1e28b0dc370ea1c4054 +MISC metadata.xml 556 SHA256 08f79471dfb1514ae1916cbffcf09fb0e9b1475e71b441bbcefa4f78d7b54b2e SHA512 bff6813bf9c5110c2e4f5764f911309325923cb58300c19c079d1e6de3d6c4c0bcaf4e206fa4bc11ebf54b961c7e09217310b5647029350d4f9602da6325db0c WHIRLPOOL 885c0912aa69366250a9ea0e58fd185058f50ff53e5465e46f2e3f8ccfde4b4cbb6637229c905593785aae48091dfa2543ce687cc607c39d2027603fe51a123d 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 @@ + + + + + python@gentoo.org + Python + + Sphinx is a tool to create documentation for Python projects (or other documents consisting of multiple reStructuredText sources). + + Sphinx + + + enable internet capabilities + + 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..4df1f6a06baf --- /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.python.org/pypi/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/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..dff5692f906a --- /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.python.org/pypi/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/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..d8392674210d --- /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.python.org/pypi/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/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..46bcb37d3524 --- /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.python.org/pypi/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/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/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.5.2.ebuild b/dev-python/sphinx/sphinx-1.5.2.ebuild new file mode 100644 index 000000000000..90b991d5aef6 --- /dev/null +++ b/dev-python/sphinx/sphinx-1.5.2.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 eutils versionator + +DESCRIPTION="Python documentation generator" +HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.python.org/pypi/Sphinx" +SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~ppc ~ppc64 ~x86" +IUSE="doc latex net test" + +RDEPEND=" + >=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}] + =dev-python/docutils-0.11[${PYTHON_USEDEP}] + >=dev-python/jinja-2.3[${PYTHON_USEDEP}] + >=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}] + >=dev-python/six-1.5[${PYTHON_USEDEP}] + >=dev-python/Babel-2.1.1[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}] + >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}] + =dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}] + >=dev-python/whoosh-2.0[${PYTHON_USEDEP}] + )" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/mock[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/simplejson[${PYTHON_USEDEP}]' pypy) + dev-python/html5lib[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}] + >=dev-python/whoosh-2.0[${PYTHON_USEDEP}] + dev-python/flake8[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-cov[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'pypy*' 'python2*') + $(python_gen_cond_dep 'dev-python/typing[${PYTHON_USEDEP}]' 'pypy*' 'python2*' python3_4 ) + )" + +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_searchadapters.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.3-r1.ebuild b/dev-python/sphinx/sphinx-1.6.3-r1.ebuild new file mode 100644 index 000000000000..4633c97a8418 --- /dev/null +++ b/dev-python/sphinx/sphinx-1.6.3-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +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 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc latex net test" + +RDEPEND=" + >=dev-python/alabaster-0.7.9[${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/sqlalchemy-0.9[${PYTHON_USEDEP}] + >=dev-python/whoosh-2.0[${PYTHON_USEDEP}] + )" +PDEPEND="dev-python/sphinxcontrib-websupport[${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.3-r2.ebuild b/dev-python/sphinx/sphinx-1.6.3-r2.ebuild new file mode 100644 index 000000000000..a836d2260438 --- /dev/null +++ b/dev-python/sphinx/sphinx-1.6.3-r2.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +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 x86 ~amd64-linux ~x86-linux ~x64-solaris" +IUSE="doc latex net test" + +RDEPEND=" + >=dev-python/alabaster-0.7.9[${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/sqlalchemy-0.9[${PYTHON_USEDEP}] + >=dev-python/whoosh-2.0[${PYTHON_USEDEP}] + )" +PDEPEND="dev-python/sphinxcontrib-websupport[${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 +} -- cgit v1.2.3