summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2019-11-20 18:34:58 -0800
committerPatrick McLean <chutzpah@gentoo.org>2019-11-20 18:34:58 -0800
commitd9d466771981a0c424a201603f596b1efd5a2a8e (patch)
treeeb69208e9f458a602e6ca2a0ce3834e18fef4258 /dev-python/importlib_metadata
parentsys-cluster/ceph: revbump, move to GLEP 81 (diff)
downloadgentoo-d9d466771981a0c424a201603f596b1efd5a2a8e.tar.gz
gentoo-d9d466771981a0c424a201603f596b1efd5a2a8e.tar.bz2
gentoo-d9d466771981a0c424a201603f596b1efd5a2a8e.zip
dev-python/importlib_metadata-0.23-r1: revbump drop unneeded dep, cleanup tests/docs
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/importlib_metadata')
-rw-r--r--dev-python/importlib_metadata/importlib_metadata-0.23-r1.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/dev-python/importlib_metadata/importlib_metadata-0.23-r1.ebuild b/dev-python/importlib_metadata/importlib_metadata-0.23-r1.ebuild
new file mode 100644
index 000000000000..4703e20cd4fb
--- /dev/null
+++ b/dev-python/importlib_metadata/importlib_metadata-0.23-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6,7}} )
+
+inherit distutils-r1
+
+DESCRIPTION="Read metadata from Python packages"
+HOMEPAGE="https://importlib-metadata.readthedocs.io/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="doc test"
+
+RDEPEND="
+ dev-python/zipp[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '>=dev-python/configparser-3.5[${PYTHON_USEDEP}]' -2)
+ $(python_gen_cond_dep 'dev-python/contextlib2[${PYTHON_USEDEP}]' -2)
+ $(python_gen_cond_dep 'dev-python/pathlib2[${PYTHON_USEDEP}]' -2)
+"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep 'dev-python/importlib_resources[${PYTHON_USEDEP}]' pypy{,3} python{2_7,3_{5,6}})
+ dev-python/packaging[${PYTHON_USEDEP}]
+ )
+ doc? (
+ $(python_gen_any_dep '>=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]')
+ $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')
+ )
+"
+
+distutils_enable_tests unittest
+
+python_check_deps() {
+ if use doc; then
+ has_version ">=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]" || return ${?}
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]" || return ${?}
+ fi
+ return 0
+}
+
+python_prepare_all() {
+ sed -i "/'sphinx.ext.intersphinx'/d" ${PN}/docs/conf.py || die
+ sed -i "s:use_scm_version=True:version='${PV}':" setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ sphinx-build ${PN}/docs docs/_build/html || die
+ HTML_DOCS=( docs/_build/html/. )
+ fi
+}