1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7,8} )
12 DESCRIPTION="Backport of new features in Python's tempfile module"
13 HOMEPAGE="https://github.com/PiDelport/backports.tempfile https://pypi.org/project/backports.tempfile/"
14 SRC_URI="mirror://pypi/${P:0:1}/${MY_PN}/${MY_P}.tar.gz"
18 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
20 RDEPEND="dev-python/backports[${PYTHON_USEDEP}]
21 dev-python/backports-weakref[${PYTHON_USEDEP}]"
23 dev-python/setuptools[${PYTHON_USEDEP}]"
24 # Tests require backports.test.support
26 S="${WORKDIR}/${MY_P}"
28 python_prepare_all() {
29 sed -e "s|'setuptools_scm'||" \
31 distutils-r1_python_prepare_all
35 PYTHONPATH="${BUILD_DIR}/lib" \
36 "${PYTHON:-python}" tests/test_tempfile.py || die "tests failed with ${EPYTHON}"
40 # avoid a collision with dev-python/backports
41 rm "${BUILD_DIR}"/lib/backports/__init__.py || die
42 distutils-r1_python_install --skip-build