diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/ujson/ujson-1.33.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/ujson/ujson-1.33.ebuild')
-rw-r--r-- | dev-python/ujson/ujson-1.33.ebuild | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-python/ujson/ujson-1.33.ebuild b/dev-python/ujson/ujson-1.33.ebuild new file mode 100644 index 000000000000..8c49a7e6fe88 --- /dev/null +++ b/dev-python/ujson/ujson-1.33.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# One test; FAIL: test_encodeToUTF8 (__main__.UltraJSONTests) under py2.5. +# Fix and repair and re-insert if it's REALLY needed +PYTHON_COMPAT=( python2_7 python3_{4,5} ) + +inherit distutils-r1 + +DESCRIPTION="Ultra fast JSON encoder and decoder for Python" +HOMEPAGE="https://pypi.python.org/pypi/ujson/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="test" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + app-arch/unzip" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-test-py3.patch +) + +python_test() { + # See setup.py; line 72. Again "${S}" is used for reading tests + # Since py3_2 is first in the queue it needs its own copy + # or else all py2s to follow will be reading read py3 tests + if [[ "${EPYTHON}" =~ 'python3' ]]; then + cd "${BUILD_DIR}"/lib || die + cp -a "${S}"/tests/ . || die + 2to3 -w tests/tests.py || die + "${PYTHON}" tests/tests.py || die + rm -rf tests/ || die + else + "${PYTHON}" tests/tests.py || die + fi +} |