diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-04-12 21:03:09 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-04-12 21:03:09 +0000 |
| commit | d97953e6ff67978da9554e7b4601aedceb21e215 (patch) | |
| tree | 674053c902db6972b9716c9ac3b1e960ee7a5358 /dev-python/pytest-benchmark | |
| parent | 1d1fa5bb30df70070bbbbd2b777b839d31f09c41 (diff) | |
| download | baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.gz baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.xz baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pytest-benchmark')
| -rw-r--r-- | dev-python/pytest-benchmark/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/pytest-benchmark/metadata.xml | 23 | ||||
| -rw-r--r-- | dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild | 51 |
3 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/pytest-benchmark/Manifest b/dev-python/pytest-benchmark/Manifest new file mode 100644 index 000000000000..f02988a91720 --- /dev/null +++ b/dev-python/pytest-benchmark/Manifest @@ -0,0 +1 @@ +DIST pytest-benchmark-3.4.1.tar.gz 322758 BLAKE2B d29254f412aee0955429e7957fa31e9443b3319bec256b601c456efa7020abbd5b4d9ed43799fda62f53f70f14de3f42a93b29b7366989294f037ec2ee3215fc SHA512 54fb5e3a176578b3c8f339878c7a9d047a0785befcbba42bb68c34b4b636d9b6f6a2097b36c5eefbbcf1a91f943bdae762c7978a0dba1af53514052f513ef4c5 diff --git a/dev-python/pytest-benchmark/metadata.xml b/dev-python/pytest-benchmark/metadata.xml new file mode 100644 index 000000000000..bb332d1e981c --- /dev/null +++ b/dev-python/pytest-benchmark/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lssndrbarbieri@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <longdescription lang="en"> + This plugin tightly integrates into pytest. To use this effectively you should know a thing or two about pytest first. Take a look at the introductory material or watch talks. + + Few notes: + + This plugin benchmarks functions and only that. If you want to measure block of code or whole programs you will need to write a wrapper function. + In a test you can only benchmark one function. If you want to benchmark many functions write more tests or use parametrization http://docs.pytest.org/en/latest/parametrize.html. + To run the benchmarks you simply use pytest to run your "tests". The plugin will automatically do the benchmarking and generate a result table. Run pytest --help for more details. + +This plugin provides a benchmark fixture. This fixture is a callable object that will benchmark any function passed to it. + </longdescription> + <upstream> + <remote-id type="github">ionelmc/pytest-benchmark</remote-id> + <remote-id type="pypi">pytest-benchmark</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild new file mode 100644 index 000000000000..aa5f812f7986 --- /dev/null +++ b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{7,8,9,10} ) +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" + +DOCS=( AUTHORS.rst CHANGELOG.rst README.rst ) + +RDEPEND="dev-python/py-cpuinfo[${PYTHON_USEDEP}]" +BDEPEND="test? ( + dev-python/aspectlib[${PYTHON_USEDEP}] + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/hunter[${PYTHON_USEDEP}] + dev-python/pygal[${PYTHON_USEDEP}] + dev-python/pygaljs[${PYTHON_USEDEP}] + $(python_gen_cond_dep \ + 'dev-python/elasticsearch-py[${PYTHON_USEDEP}]' python3_8 python3_9 ) +)" + +distutils_enable_tests pytest +distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme + +python_prepare() { + if [[ ${EPYTHON} == python3.10 ]]; then + rm tests/test_elasticsearch_storage.py || die + fi +} + +python_test() { + local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}" + local epytest_args=( + -o markers=benchmark + --deselect tests/test_cli.py::test_help + --deselect tests/test_cli.py::test_help_compare + ) + + epytest "${epytest_args[@]}" +} |
