*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / xlsxwriter / xlsxwriter-0.9.8.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7} pypy3 )
7
8 inherit distutils-r1
9
10 MY_PN="XlsxWriter"
11 MY_P="${MY_PN}-${PV}"
12
13 DESCRIPTION="Python module for creating Excel XLSX files"
14 HOMEPAGE="https://github.com/jmcnamara/XlsxWriter"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz
16         test? ( https://github.com/jmcnamara/XlsxWriter/archive/RELEASE_${PV}.zip -> ${P}-tests.zip )
17
18 "
19
20 SLOT="0"
21 LICENSE="BSD"
22 KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
23 IUSE="test"
24 RESTRICT="!test? ( test )"
25
26 RDEPEND=""
27 DEPEND="${RDEPEND}
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         test? ( app-arch/unzip
30                         dev-python/pytest[${PYTHON_USEDEP}] )"
31
32 S="${WORKDIR}"/${MY_P}
33
34 python_prepare_all() {
35         if use test; then
36                 cp -r "${WORKDIR}"/${MY_PN}-RELEASE_${PV}/${PN}/test ${PN}/ || die
37         fi
38         distutils-r1_python_prepare_all
39 }
40
41 python_test() {
42         py.test -v -v || die
43 }