dev-python/kombu: 4.6.8 allarches stablized
[gentoo.git] / dev-python / backports-tempfile / backports-tempfile-1.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6
7 inherit distutils-r1
8
9 MY_PN=${PN/-/.}
10 MY_P=${MY_PN}-${PV}
11
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"
15
16 LICENSE="PSF-2.3"
17 SLOT="0"
18 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
19 IUSE=""
20 RDEPEND="dev-python/backports[${PYTHON_USEDEP}]
21         dev-python/backports-weakref[${PYTHON_USEDEP}]"
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]"
24 # Tests require backports.test.support
25 RESTRICT="test"
26 S="${WORKDIR}/${MY_P}"
27
28 python_prepare_all() {
29         sed -e "s|'setuptools_scm'||" \
30                 -i setup.py || die
31         distutils-r1_python_prepare_all
32 }
33
34 python_test() {
35         PYTHONPATH="${BUILD_DIR}/lib" \
36                 "${PYTHON:-python}" tests/test_tempfile.py || die "tests failed with ${EPYTHON}"
37 }
38
39 python_install() {
40         # avoid a collision with dev-python/backports
41         rm "${BUILD_DIR}"/lib/backports/__init__.py || die
42         distutils-r1_python_install --skip-build
43 }