1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # One test; FAIL: test_encodeToUTF8 (__main__.UltraJSONTests) under py2.5.
7 # Fix and repair and re-insert if it's REALLY needed
8 PYTHON_COMPAT=( python2_7 python3_5 )
12 DESCRIPTION="Ultra fast JSON encoder and decoder for Python"
13 HOMEPAGE="https://pypi.org/project/ujson/"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
18 KEYWORDS="amd64 arm x86"
20 RESTRICT="!test? ( test )"
23 dev-python/setuptools[${PYTHON_USEDEP}]
24 dev-python/nose[${PYTHON_USEDEP}]
29 "${FILESDIR}"/${P}-test-py3.patch
33 # See setup.py; line 72. Again "${S}" is used for reading tests
34 # Since py3_2 is first in the queue it needs its own copy
35 # or else all py2s to follow will be reading read py3 tests
36 if [[ "${EPYTHON}" =~ 'python3' ]]; then
37 cd "${BUILD_DIR}"/lib || die
38 cp -a "${S}"/tests/ . || die
39 2to3 -w tests/tests.py || die
40 "${PYTHON}" tests/tests.py || die
43 "${PYTHON}" tests/tests.py || die