forked from pool/python-pytest-benchmark
- update to 5.1.0:
* Fixed broken hooks handling on pytest 8.1 or later (the
TypeError: import_path() missing 1 required keyword-only
argument: 'consider_namespace_packages' issue). Unfortunately
this sets the minimum supported pytest version to 8.1.
* Fixed bad fixture check that broke down then nbmake was
enabled.
* Dropped support for now EOL Python 3.8. Also moved tests
suite to only test the latest pytest versions (8.3.x).
* Fix generate parametrize tests benchmark csv report errors
(issue #268). Contributed by Johnny Huang in #269.
* Added the --benchmark-time-unit cli option for overriding the
measurement unit used for display. Contributed by Tony Kuo in
#257.
* Fixes spelling in some help texts. Contributed by Eugeniy in
#267.
* Added new cprofile options: --benchmark-cprofile-loops=LOOPS
- previously profiling only ran the function once, this allow
customization. --benchmark-cprofile-top=COUNT - allows
showing more rows. --benchmark-cprofile-dump=[FILENAME-
PREFIX] - allows saving to a file (that you can load in
snakeviz, RunSnakeRun or other tools).
* --benchmark-cprofile-loops=LOOPS - previously profiling only
ran the function once, this allow customization.
* --benchmark-cprofile-top=COUNT - allows showing more rows.
* --benchmark-cprofile-dump=[FILENAME-PREFIX] - allows saving
to a file (that you can load in snakeviz, RunSnakeRun or
other tools).
* Removed hidden dependency on py.path (replaced with pathlib).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-benchmark?expand=0&rev=32
This commit is contained in:
94
python-pytest-benchmark.spec
Normal file
94
python-pytest-benchmark.spec
Normal file
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# spec file for package python-pytest-benchmark
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-pytest-benchmark
|
||||
Version: 5.1.0
|
||||
Release: 0
|
||||
Summary: A py.test fixture for benchmarking code
|
||||
License: BSD-2-Clause
|
||||
URL: https://github.com/ionelmc/pytest-benchmark
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-benchmark/pytest-benchmark-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE Ignore DeprecationWarning, some of our dependancies use
|
||||
# pkg_resources.
|
||||
Patch2: ignore-deprecationwarning.patch
|
||||
BuildRequires: %{python_module aspectlib}
|
||||
BuildRequires: %{python_module elasticsearch}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module py-cpuinfo}
|
||||
BuildRequires: %{python_module pygaljs}
|
||||
BuildRequires: %{python_module pygal}
|
||||
BuildRequires: %{python_module pytest >= 3.8}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-py-cpuinfo
|
||||
Requires: python-pytest >= 3.8
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Recommends: python-aspectlib
|
||||
Recommends: python-elasticsearch
|
||||
Recommends: python-pygal
|
||||
Recommends: python-pygaljs
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A py.test fixture for benchmarking code. It will group the tests into
|
||||
rounds that are calibrated to the chosen timer.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n pytest-benchmark-%{version}
|
||||
# skip nbmake
|
||||
rm pytest.ini
|
||||
# skip cli tests as we use update-alternatives
|
||||
rm -f tests/test_cli.py
|
||||
# Don't look for a test pass in the wrong place -- https://github.com/ionelmc/pytest-benchmark/issues/214
|
||||
sed -i -e '/test_fast PASSED/d' -e '/test_fast SKIPPED/d' tests/test_benchmark.py
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/pytest-benchmark
|
||||
%python_clone -a %{buildroot}%{_bindir}/py.test-benchmark
|
||||
|
||||
%check
|
||||
%pytest tests
|
||||
|
||||
%post
|
||||
%{python_install_alternative pytest-benchmark py.test-benchmark}
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative pytest-benchmark
|
||||
|
||||
%files %{python_files}
|
||||
%doc AUTHORS.rst CHANGELOG.rst README.rst
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/py.test-benchmark
|
||||
%python_alternative %{_bindir}/pytest-benchmark
|
||||
%{python_sitelib}/pytest_benchmark
|
||||
%{python_sitelib}/pytest_benchmark-%{version}*-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user