Files
guru/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
Andrew Ammerlaan 57fe81e306 dev-python/pytest-benchmark: tried and failed to fix tests
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
2020-03-29 14:01:46 +02:00

54 lines
1.4 KiB
Bash

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
DESCRIPTION="py.test fixture for benchmarking code "
HOMEPAGE="
https://pypi.python.org/pypi/pytest-benchmark
https://github.com/ionelmc/pytest-benchmark
"
SRC_URI="https://github.com/ionelmc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# during tests import fails because conflict with the already installed files
# not sure how to fix, it would require setting some python variables but that would
# probably lead to all other packages being unfindable by the tests
RESTRICT="test"
RDEPEND="
dev-python/py-cpuinfo[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
dev-python/aspectlib[${PYTHON_USEDEP}]
dev-python/elasticsearch-py[${PYTHON_USEDEP}]
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/hunter[${PYTHON_USEDEP}]
dev-python/pygal[${PYTHON_USEDEP}]
dev-python/pygaljs[${PYTHON_USEDEP}]
dev-python/pytest-instafail[${PYTHON_USEDEP}]
dev-python/pytest-travis-fold[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme
python_test() {
# has to be run in source dir
PYTHONPATH="${S}"
cd "${S}" || die
pytest -vv || die "Tests fail with ${EPYTHON}"
}