ec2584da018b57979037569bb0b634721e594ac1
[gentoo.git] / dev-python / jsonschema / jsonschema-2.5.1-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 python3_6 pypy3 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="An implementation of JSON-Schema validation for Python"
11 HOMEPAGE="https://pypi.org/project/jsonschema/ https://github.com/Julian/jsonschema"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/rfc3986[${PYTHON_USEDEP}]
22         dev-python/strict-rfc3339[${PYTHON_USEDEP}]
23         dev-python/webcolors[${PYTHON_USEDEP}]
24         $(python_gen_cond_dep \
25                 'dev-python/functools32[${PYTHON_USEDEP}]' 'python2*' pypy)
26         "
27 DEPEND="${RDEPEND}
28         dev-python/vcversioner[${PYTHON_USEDEP}]
29         dev-python/setuptools[${PYTHON_USEDEP}]
30         test? ( dev-python/mock[${PYTHON_USEDEP}] )"
31
32 python_test() {
33         "${PYTHON}" -m unittest discover || die "Testing failed with ${EPYTHON}"
34 }