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.
gentoo-overlay/dev-python/citeproc-py/citeproc-py-0.6.0.ebuild

44 lines
1.1 KiB

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
# Keep synced with tests/citeproc-test.py
TEST_SUITE_COMMIT="c3db429ab7c6b9b9ccaaa6d3c6bb9e503f0d7b11"
inherit distutils-r1
DESCRIPTION="Yet another Python CSL Processor"
HOMEPAGE="https://pypi.org/project/citeproc-py/"
SRC_URI="
mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
test? (
https://github.com/citation-style-language/test-suite/archive/${TEST_SUITE_COMMIT}.tar.gz -> ${PN}-test-suite-${TEST_SUITE_COMMIT}.tar.gz
)"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
BDEPEND=">=app-text/rnc2rng-2.6.3[${PYTHON_USEDEP}]"
RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]"
PATCHES=( "${FILESDIR}/stop_test_from_accessing_git-${PV}.patch" )
distutils_enable_tests nose
src_prepare() {
default
if use test ; then
mv "${WORKDIR}/test-suite-${TEST_SUITE_COMMIT}" "${S}/tests/test-suite" || die
fi
}
python_test() {
nosetests -v --ignore-files=citeproc-test.py || die "Tests failed with ${EPYTHON}"
${EPYTHON} tests/citeproc-test.py -vs || die "Tests failed with ${EPYTHON}"
}