dev-python/pytest-benchmark: add for dev-libs/olm

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2021-05-21 20:54:32 +03:00
parent a78d33721f
commit fc0212ce71
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
3 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST pytest-benchmark-3.4.1.tar.gz 340349 BLAKE2B 474743ef6c2d098ca6451e6da1a40686a529af901bf40ba8daf900844166895c676e3a95e8c252557d97d6668e077f625f96c90c00cdb4a1de021a5e5abae479 SHA512 630b27462796aea97c2d878bb936009d59e1c33be3f4219113eae5e389d2cd7912a7f7bc10a1a9a7abbfc4f69213be10a3cc68bbdceef0783f4b0a8a13600119

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>parona@protonmail.com</email>
<name>Alfred Wingate</name>
</maintainer>
<upstream>
<remote-id type="github">ionelmc/pytest-benchmark</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,67 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1 multiprocessing
DESCRIPTION="py.test fixture for benchmarking code"
HOMEPAGE="https://github.com/ionelmc/pytest-benchmark"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-python/aspectlib[${PYTHON_USEDEP}]
dev-python/elasticsearch-py[${PYTHON_USEDEP}]
dev-python/py-cpuinfo[${PYTHON_USEDEP}]
dev-python/pygal[${PYTHON_USEDEP}]
dev-python/pygaljs[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/sphinx-py3doc-enhanced-theme[${PYTHON_USEDEP}]
test? (
${RDEPEND}
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
BDEPEND="
dev-python/sphinx
"
distutils_enable_tests pytest
DOCS=( "README.rst" )
python_prepare_all() {
sed -i\
-e "/def test_help(testdir):/i@pytest.mark.xfail(reason='Not quite sure why it fails in the ebuild, please tell if it succeeds')" \
-e "/def test_help_compare(testdir, args):/i@pytest.mark.xfail(reason='Not quite sure why it fails in the ebuild, please tell if it succeeds')" \
tests/test_cli.py || die
distutils-r1_python_prepare_all
}
python_compile_all() {
if use doc; then
sphinx-build -b html docs docs/_build/html || die
fi
sphinx-build -b man docs docs/_build/man || die
}
python_test() {
distutils_install_for_testing
epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
}
python_install_all() {
use doc && HTML_DOCS=( docs/_build/html/. )
doman docs/_build/man/*
distutils-r1_python_install_all
}