diff options
author | David Seifert <soap@gentoo.org> | 2017-01-16 18:34:13 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-01-19 01:48:46 +0100 |
commit | daa8cfe0a3d9151388a3c8d8694ada2376470092 (patch) | |
tree | 10920a1af066d604d74ff9088bfd7c7ce1f0656a /dev-python/sphinx | |
parent | app-emulation/wine: Bump mono version and prevent double patch for flex (diff) | |
download | gentoo-daa8cfe0a3d9151388a3c8d8694ada2376470092.tar.gz gentoo-daa8cfe0a3d9151388a3c8d8694ada2376470092.tar.bz2 gentoo-daa8cfe0a3d9151388a3c8d8694ada2376470092.zip |
dev-python/sphinx: Version bump to 1.5.1
Gentoo-bug: 579106
* EAPI=6
* Basis for ebuild by Brian Dolbec (dol-sen)
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3371
Diffstat (limited to 'dev-python/sphinx')
-rw-r--r-- | dev-python/sphinx/Manifest | 1 | ||||
-rw-r--r-- | dev-python/sphinx/files/sphinx-1.5.1-fix-pycode-grammar.patch | 14 | ||||
-rw-r--r-- | dev-python/sphinx/metadata.xml | 20 | ||||
-rw-r--r-- | dev-python/sphinx/sphinx-1.5.1.ebuild | 114 |
4 files changed, 140 insertions, 9 deletions
diff --git a/dev-python/sphinx/Manifest b/dev-python/sphinx/Manifest index 0ea155c45a1f..80d5f32e458b 100644 --- a/dev-python/sphinx/Manifest +++ b/dev-python/sphinx/Manifest @@ -3,3 +3,4 @@ DIST Sphinx-1.2.2.tar.gz 3143671 SHA256 2d3415f5b3e6b7535877f4c84fe228bdb802a899 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.1.tar.gz 4397246 SHA256 8e6a77a20b2df950de322fc32f3b508697d9d654fe984e3cc88f446a5b4c17c5 SHA512 ec06998921663c0e01096743c7908131b6173ace42373eea8a95a3e24706db119eaf3eb096a70e12ecb5a4a135ee599abdf36c53f786bd392a32fdad45438794 WHIRLPOOL 11bc6a0d308513c8e1face57123a0048899788a7307ee75ed0d52508628f08cc64d08a889d1af3ed67f70ef71d3549fbc5ee394d79203286cb690ca61a8f8ee0 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 index f4d877b2e22d..fe4bfd29c81f 100644 --- a/dev-python/sphinx/metadata.xml +++ b/dev-python/sphinx/metadata.xml @@ -1,13 +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> + <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.5.1.ebuild b/dev-python/sphinx/sphinx-1.5.1.ebuild new file mode 100644 index 000000000000..938c0861130f --- /dev/null +++ b/dev-python/sphinx/sphinx-1.5.1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python{3_4,3_5} ) +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 ~x86" +IUSE="doc latex net 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.5[${PYTHON_USEDEP}] + >=dev-python/Babel-2.1.1[${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/imagesize[${PYTHON_USEDEP}] + latex? ( + dev-texlive/texlive-latexextra + app-text/dvipng + ) + net? ( + >=dev-python/requests-2.4.0[${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/nose[${PYTHON_USEDEP}] + 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/requests[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'pypy*' 'python2*') + dev-python/typing[${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_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 +} |