*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / dev-python / lz4 / lz4-0.8.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python{2_7,3_5,3_6} pypy )
7
8 inherit distutils-r1
9
10 DESCRIPTION="LZ4 Bindings for Python"
11 HOMEPAGE="https://pypi.org/project/lz4/ https://github.com/steeve/python-lz4"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 SLOT="0"
15 LICENSE="BSD"
16 KEYWORDS="amd64 arm x86 ~amd64-linux ~x86-linux"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND=""
21 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
22         test? ( dev-python/nose[${PYTHON_USEDEP}] )
23 "
24
25 python_prepare_all() {
26         sed \
27                 -e '/nose/s:setup_requires:test_requires:g' \
28                 -i setup.py || die
29         mkdir "${S}"/tests
30         cp "${FILESDIR}"/test.py "${S}"/tests
31         distutils-r1_python_prepare_all
32 }
33
34 python_test() {
35         esetup.py test || dies "Tests failed with ${EPYTHON}"
36 }