Drop $Id$ per council decision in bug #611234.
[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
4 EAPI=5
5
6 PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Wraps the best available JSON implementation available in a common interface"
11 HOMEPAGE="https://bitbucket.org/runeh/anyjson"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="amd64 ~arm64 x86"
17 IUSE="test"
18
19 # please keep all supported implementations in 'test?'
20 # to make sure the package is used in the widest way
21 DEPEND="${RDEPEND}
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         test? (
24                 dev-python/nose[${PYTHON_USEDEP}]
25                 dev-python/simplejson[$(python_gen_usedep 'python2*' python3_3 'pypy*')]
26         )"
27
28 python_test() {
29         cp -r -l tests "${BUILD_DIR}" || die
30         if [[ ${EPYTHON} == python3* ]]; then
31                 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die
32         fi
33
34         nosetests -w "${BUILD_DIR}"/tests || die "Tests fail with ${EPYTHON}"
35 }