1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_6)
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"
15 KEYWORDS="~amd64 ~x86"
17 RESTRICT="!test? ( test )"
19 RDEPEND=">=dev-python/six-1.10.0[${PYTHON_USEDEP}]"
21 dev-python/setuptools[${PYTHON_USEDEP}]
23 >=dev-python/nose-1.0[${PYTHON_USEDEP}]
24 dev-python/mock[${PYTHON_USEDEP}]
25 dev-python/pytest[${PYTHON_USEDEP}]
30 "${FILESDIR}/xdis-3.3.0-remove-pytest-runner-dep.patch"
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}"
39 PYTHONPATH="${S}/test:${BUILD_DIR}/lib" \
40 ${EPYTHON} test_pyenvlib.py --verify --simple --compile || die \
41 "Tests failed under ${EPYTHON}"