EAPI=7
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
inherit distutils-r1
LICENSE="BSD-2"
IUSE="doc test"
-REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
-
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-cov[${PYTHON_USEDEP}]
- )"
-# Required for running tests
-DISTUTILS_IN_SOURCE_BUILD=1
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
S="${WORKDIR}"/${P#python-}
-pkg_setup() {
- use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
-}
-
python_compile_all() {
use doc && emake -C docs html
}
python_test() {
- if python_is_python3; then
- 2to3 -w --no-diffs -n tests/ sqlparse/
- py.test ./tests || die "testsuite failed ${EPYTHON}"
- else
- py.test tests || die "testsuite failed under ${EPYTHON}"
- fi
+ pytest tests || die "testsuite failed under ${EPYTHON}"
}
python_install_all() {