diff options
author | Louis Sautier <sbraz@gentoo.org> | 2019-07-13 00:45:16 +0200 |
---|---|---|
committer | Louis Sautier <sbraz@gentoo.org> | 2019-07-13 01:04:25 +0200 |
commit | 0bf9aabc4ce817581da94f57feba1a57c7d450a5 (patch) | |
tree | 0e0041dc239236d81cfd480b05461a51c71d7fb6 /dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild | |
parent | dev-python/importlib_resources: add myself and python as maintainers (diff) | |
download | gentoo-0bf9aabc4ce817581da94f57feba1a57c7d450a5.tar.gz gentoo-0bf9aabc4ce817581da94f57feba1a57c7d450a5.tar.bz2 gentoo-0bf9aabc4ce817581da94f57feba1a57c7d450a5.zip |
dev-python/importlib_resources: add PyPy{,3}, fix tests, deps
* If tests are called with setup.py, _py2.py is loaded even when Python 3
is used and may fail because of a missing "pathlib2" package.
* Add x86 keyword.
* Use PyPI tarballs.
* Fix dependencies.
Package-Manager: Portage-2.3.67, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild')
-rw-r--r-- | dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild b/dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild new file mode 100644 index 000000000000..1e8e022c6b57 --- /dev/null +++ b/dev-python/importlib_resources/importlib_resources-1.0.2-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# This is a backport of Python 3.7's importlib.resources +PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6}} ) + +inherit distutils-r1 + +DESCRIPTION="Read resources from Python packages" +HOMEPAGE="https://importlib-resources.readthedocs.io/en/latest/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +LICENSE="Apache-2.0" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=" + $(python_gen_cond_dep 'dev-python/pathlib2[${PYTHON_USEDEP}]' -2) + virtual/python-typing[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( ${RDEPEND} ) + dev-python/setuptools[${PYTHON_USEDEP}] +" + +# https://gitlab.com/python-devs/importlib_resources/issues/71 +PATCHES=( "${FILESDIR}/${P}-skip-wheel.patch" ) + +python_test() { + "${EPYTHON}" -m unittest discover -v || die "tests failed with ${EPYTHON}" +} |