media-sound/teamspeak-client: bump to version 3.5.1
[gentoo.git] / dev-python / semantic_version / semantic_version-2.8.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( pypy3 python3_{6,7} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python library providing a few tools handling SemVer in Python"
11 HOMEPAGE="https://pypi.org/project/semantic_version/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13 #SRC_URI="https://github.com/rbarrois/python-semanticversion/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="amd64 arm64 x86"
18 IUSE="doc test"
19
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
23         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
24 "
25 RESTRICT="!test? ( test )"
26
27 python_compile_all() {
28         if use doc; then
29                 sphinx-build docs docs/_build/html || die
30                 HTML_DOCS=( docs/_build/html/. )
31         fi
32 }
33
34 python_test() {
35         # The django test hangs
36         pytest -vv --ignore tests/test_django.py\
37                 || die "tests failed with ${EPYTHON}"
38 }