mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 10:38:07 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
@@ -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}"
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user