Merge github#363: sys-process/atop: add systemd support
[gentoo.git] / dev-python / anyjson / anyjson-0.3.3-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
8
9 inherit distutils-r1
10
11 DESCRIPTION="Wraps the best available JSON implementation available in a common interface"
12 HOMEPAGE="https://bitbucket.org/runeh/anyjson"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="amd64 ~arm64 x86"
18 IUSE="test"
19
20 # please keep all supported implementations in 'test?'
21 # to make sure the package is used in the widest way
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? (
25                 dev-python/nose[${PYTHON_USEDEP}]
26                 dev-python/simplejson[$(python_gen_usedep 'python2*' python3_3 'pypy*')]
27         )"
28
29 python_test() {
30         cp -r -l tests "${BUILD_DIR}" || die
31         if [[ ${EPYTHON} == python3* ]]; then
32                 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
33         fi
34
35         nosetests -w "${BUILD_DIR}"/tests || die "Tests fail with ${EPYTHON}"
36 }