You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
4 years ago
|
PYTHON_COMPAT=( python3_{6..9} )
|
||
4 years ago
|
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||
|
inherit distutils-r1
|
||
|
|
||
|
DESCRIPTION="Python library for serializing any arbitrary object graph into JSON"
|
||
|
HOMEPAGE="https://github.com/jsonpickle/jsonpickle/ https://pypi.org/project/jsonpickle/"
|
||
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
|
||
4 years ago
|
IUSE="doc test"
|
||
|
RESTRICT="!test? ( test )"
|
||
|
|
||
|
# There are optional json backends serializer/deserializers in addition to those selected here
|
||
|
# jsonlib, yajl.
|
||
|
RDEPEND="
|
||
|
dev-python/simplejson[${PYTHON_USEDEP}]
|
||
|
dev-python/feedparser[${PYTHON_USEDEP}]
|
||
|
dev-python/ujson[${PYTHON_USEDEP}]
|
||
4 years ago
|
$(python_gen_cond_dep '
|
||
|
dev-python/importlib_metadata[${PYTHON_USEDEP}]
|
||
|
' python3_{6,7})
|
||
4 years ago
|
"
|
||
4 years ago
|
# toml via setuptools_scm[toml]
|
||
|
BDEPEND="
|
||
|
dev-python/setuptools_scm[${PYTHON_USEDEP}]
|
||
|
dev-python/toml[${PYTHON_USEDEP}]"
|
||
4 years ago
|
|
||
|
distutils_enable_sphinx "docs/source"
|
||
4 years ago
|
distutils_enable_tests pytest
|
||
4 years ago
|
|
||
4 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/jsonpickle-1.4.1-importlib-metadata.patch
|
||
|
)
|
||
|
|
||
4 years ago
|
python_prepare_all() {
|
||
|
# too many dependencies
|
||
|
rm tests/pandas_test.py || die
|
||
|
sed -e '/pandas/ d' -i tests/runtests.py || die
|
||
|
|
||
4 years ago
|
sed -i -e 's:--flake8 --black --cov --cov-append::' pytest.ini || die
|
||
|
|
||
4 years ago
|
distutils-r1_python_prepare_all
|
||
|
}
|
||
|
|
||
4 years ago
|
python_test() {
|
||
4 years ago
|
pytest -vv tests || die "Tests failed with ${EPYTHON}"
|
||
4 years ago
|
}
|