*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / xdis / xdis-3.3.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 python3_6)
6
7 inherit distutils-r1
8
9 DESCRIPTION="Python cross-version byte-code disassembler and marshal routines"
10 HOMEPAGE="https://github.com/rocky/python-xdis/ https://pypi.org/project/xdis/"
11 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND=">=dev-python/six-1.10.0[${PYTHON_USEDEP}]"
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         test? (
23                 >=dev-python/nose-1.0[${PYTHON_USEDEP}]
24                 dev-python/mock[${PYTHON_USEDEP}]
25                 dev-python/pytest[${PYTHON_USEDEP}]
26         )
27 "
28
29 PATCHES=(
30         "${FILESDIR}/xdis-3.3.0-remove-pytest-runner-dep.patch"
31 )
32
33 python_test() {
34         # Need to rm any pyc files to prevent test failures.
35         rm -R "${S}"/test/__pycache__
36         PYTHONPATH="${S}/test:${S}/test_unit:${BUILD_DIR}/lib" \
37                 py.test -v || die "Tests failed under ${EPYTHON}"
38         cd test
39         PYTHONPATH="${S}/test:${BUILD_DIR}/lib" \
40                 ${EPYTHON} test_pyenvlib.py --verify --simple --compile || die \
41                 "Tests failed under ${EPYTHON}"
42 }