*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / dev-python / setproctitle / setproctitle-1.1.10.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 # pypy doesn't get started in test run. Still required by www-servers/gunicorn
7 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
8
9 inherit distutils-r1 toolchain-funcs
10
11 DESCRIPTION="Allow customization of the process title"
12 HOMEPAGE="https://github.com/dvarrazzo/py-setproctitle"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND=""
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
24
25 # Required for re-write of test suite
26 DISTUTILS_IN_SOURCE_BUILD=1
27
28 python_compile_all() {
29         # Make a nice html file
30         rst2html.py README.rst > README.html
31         # The README.rst will be duplicated in src_install
32         rm README.rst || die
33 }
34
35 python_test() {
36         # The suite via the Makefile appears to not cater to pypy
37         [[ ${EPYTHON} =~ pypy ]] && return
38
39         # prepare embedded executable
40         emake \
41                 CC="$(tc-getCC)" \
42                 PYINC="$(python_get_CFLAGS)" \
43                 PYLIB="$(python_get_LIBS)" \
44                 check
45 }