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 | |
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')
4 files changed, 47 insertions, 28 deletions
diff --git a/dev-python/importlib_resources/Manifest b/dev-python/importlib_resources/Manifest index 6b5b888e590f..ee0d6e363411 100644 --- a/dev-python/importlib_resources/Manifest +++ b/dev-python/importlib_resources/Manifest @@ -1 +1 @@ -DIST importlib_resources-1.0.2.tar.gz 23605 BLAKE2B 813f913a779115575f3cab6f5be8f9e7ea706a6f0e47bc0bb29439901515b435c33975f6b1fd96d74140e488b0bd98aca3331e0d69940153b348891fd5f4f400 SHA512 3b7b254abdf2cb8ee0abf1608123c49de05d1eada081567a0e083d1f496f37643b81e771490b414dcf56672a7e7ea9aa6dd6b77ea8206d3a97e81ad69da7e927 +DIST importlib_resources-1.0.2.tar.gz 23602 BLAKE2B 24c27b45ec56d3838b039baf2ebc1e0c5ec582d5cfdeb5cf26587255bf8b32aa1fcf43802cabca3b82b3ddec8cdf2616d10489c3c1aca77c9fa91af1f25ef9e7 SHA512 50bfc5130a2c9c9354efef1cd7132e805ed0f13467ba67172f83e11d907212bef3957aeef51fd904b73996c8280008d99c918637956a470448dfd67ef4807f82 diff --git a/dev-python/importlib_resources/files/importlib_resources-1.0.2-skip-wheel.patch b/dev-python/importlib_resources/files/importlib_resources-1.0.2-skip-wheel.patch new file mode 100644 index 000000000000..1cff1fafeaf1 --- /dev/null +++ b/dev-python/importlib_resources/files/importlib_resources-1.0.2-skip-wheel.patch @@ -0,0 +1,12 @@ +diff --git a/setup.cfg b/setup.cfg +index c9ef791..412b1a9 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -19,7 +19,6 @@ classifiers = + python_requires = >=2.7,!=3.0,!=3.1,!=3.2,!=3.3 + setup_requires = + setuptools +- wheel + install_requires = + pathlib2; python_version < '3' + typing; python_version < '3.5' 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}" +} diff --git a/dev-python/importlib_resources/importlib_resources-1.0.2.ebuild b/dev-python/importlib_resources/importlib_resources-1.0.2.ebuild deleted file mode 100644 index 830ec759d0b0..000000000000 --- a/dev-python/importlib_resources/importlib_resources-1.0.2.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 python3_{5,6} ) - -inherit distutils-r1 - -DESCRIPTION="Read resources from Python packages" -HOMEPAGE="https://importlib-resources.readthedocs.io/en/latest/" -SRC_URI="https://gitlab.com/python-devs/${PN}/-/archive/${PV}/${P}.tar.gz" -LICENSE="Apache-2.0" - -SLOT="0" -KEYWORDS="~amd64" -IUSE="test" - -DEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}]" - -RDEPEND="${DEPEND}" - -python_test() { - esetup.py test -} |