[packages/python3-pytest-benchmark] Up to 5.1.0
arekm
arekm at pld-linux.org
Tue Jun 10 16:04:10 CEST 2025
commit 4385479f3c0f418800b32d63271ab0e928147103
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Jun 10 15:26:55 2025 +0200
Up to 5.1.0
python-pytest-benchmark-tests.patch | 176 ---------------------
...benchmark.spec => python3-pytest-benchmark.spec | 82 +---------
2 files changed, 5 insertions(+), 253 deletions(-)
---
diff --git a/python-pytest-benchmark.spec b/python3-pytest-benchmark.spec
similarity index 62%
rename from python-pytest-benchmark.spec
rename to python3-pytest-benchmark.spec
index 3813574..85130e9 100644
--- a/python-pytest-benchmark.spec
+++ b/python3-pytest-benchmark.spec
@@ -2,39 +2,18 @@
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests [very sensitive to pytest output]
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
Summary: py.test fixture for benchmarking code
Summary(pl.UTF-8): Wyposażenie py.testa do testowania wydajności kodu
-Name: python-pytest-benchmark
-Version: 3.4.1
-Release: 6
+Name: python3-pytest-benchmark
+Version: 5.1.0
+Release: 1
License: BSD
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/pytest-benchmark/
Source0: https://files.pythonhosted.org/packages/source/p/pytest-benchmark/pytest-benchmark-%{version}.tar.gz
-# Source0-md5: 7fa3588a1a94fc2bbf42b377d6bdb946
-Patch0: %{name}-tests.patch
+# Source0-md5: 66a8040a2bc0813be44680d4b4254882
URL: https://github.com/ionelmc/pytest-benchmark
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.6
-BuildRequires: python-setuptools
-%if %{with tests}
-#BuildRequires: python-aspectlib >= 1.4.2
-# for storage tests
-#BuildRequires: python-elasticsearch >= 5.3.0
-BuildRequires: python-freezegun >= 0.3.8
-BuildRequires: python-pathlib >= 1.0.1
-BuildRequires: python-py-cpuinfo
-# for histogram tests
-#BuildRequires: python-pygal >= 2.2.1
-#BuildRequires: python-pygaljs >= 1.0.1
-BuildRequires: python-pytest >= 3.8
-BuildRequires: python-statistics >= 1.0.3.5
-%endif
-%endif
-%if %{with python3}
BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
%if %{with tests}
@@ -55,14 +34,13 @@ BuildRequires: python3-pathlib >= 1.0.1
BuildRequires: python3-statistics >= 1.0.3.5
%endif
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
BuildRequires: python3-sphinx_py3doc_enhanced_theme
BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.6
+Requires: python3-modules >= 1:3.4
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -74,20 +52,6 @@ rounds that are calibrated to the chosen timer.
Wyposażenie (fixture) modułu py.test do testowania wydajności kodu.
Grupuje testy w rundy, które są kalibrowane do wybranego stopera.
-%package -n python3-pytest-benchmark
-Summary: py.test fixture for benchmarking code
-Summary(pl.UTF-8): Wyposażenie py.testa do testowania wydajności kodu
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-pytest-benchmark
-A py.test fixture for benchmarking code. It will group the tests into
-rounds that are calibrated to the chosen timer.
-
-%description -n python3-pytest-benchmark -l pl.UTF-8
-Wyposażenie (fixture) modułu py.test do testowania wydajności kodu.
-Grupuje testy w rundy, które są kalibrowane do wybranego stopera.
-
%package apidocs
Summary: API documentation for Python pytest_benchmark module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest_benchmark
@@ -101,7 +65,6 @@ Dokumentacja API modułu Pythona pytest_benchmark.
%prep
%setup -q -n pytest-benchmark-%{version}
-%patch -P 0 -p1
# (mostly temporarily disabled tests)
# requires elasticsearch
@@ -117,17 +80,6 @@ Dokumentacja API modułu Pythona pytest_benchmark.
%{__rm} tests/test_utils.py
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd)/src \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
@@ -135,7 +87,6 @@ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
PYTHONPATH=$(pwd)/src \
%{__python3} -m pytest tests
%endif
-%endif
%if %{with doc}
cd docs
@@ -146,48 +97,25 @@ sphinx-build-3 -b html . _build/html
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test-benchmark{,-2}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest-benchmark{,-2}
-%endif
-
-%if %{with python3}
%py3_install
%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test-benchmark{,-3}
%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest-benchmark{,-3}
ln -s py.test-benchmark-3 $RPM_BUILD_ROOT%{_bindir}/py.test-benchmark
ln -s pytest-benchmark-3 $RPM_BUILD_ROOT%{_bindir}/pytest-benchmark
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
-%attr(755,root,root) %{_bindir}/py.test-benchmark-2
-%attr(755,root,root) %{_bindir}/pytest-benchmark-2
-%{py_sitescriptdir}/pytest_benchmark
-%{py_sitescriptdir}/pytest_benchmark-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pytest-benchmark
-%defattr(644,root,root,755)
-%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
%attr(755,root,root) %{_bindir}/py.test-benchmark
%attr(755,root,root) %{_bindir}/pytest-benchmark
%attr(755,root,root) %{_bindir}/py.test-benchmark-3
%attr(755,root,root) %{_bindir}/pytest-benchmark-3
%{py3_sitescriptdir}/pytest_benchmark
%{py3_sitescriptdir}/pytest_benchmark-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files apidocs
diff --git a/python-pytest-benchmark-tests.patch b/python-pytest-benchmark-tests.patch
deleted file mode 100644
index e94995c..0000000
--- a/python-pytest-benchmark-tests.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- pytest-benchmark-3.2.3/tests/test_benchmark.py.orig 2020-01-09 10:52:40.000000000 +0100
-+++ pytest-benchmark-3.2.3/tests/test_benchmark.py 2020-01-22 19:01:38.505984152 +0100
-@@ -86,7 +86,7 @@
- "*",
- "* benchmark 'A': 2 tests *",
- "*",
-- "*====== 5 passed * ======*",
-+ "*====== 5 passed* ======*",
- ])
-
-
-@@ -203,7 +203,7 @@
- 'test_b[[]*[]] *',
- '----------------------*',
- '*', '*',
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -244,7 +244,7 @@
- '',
- 'Legend:',
- ' Outliers: 1 Standard Deviation from M*',
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -276,7 +276,7 @@
- 'Legend:',
- ' Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd '
- 'Quartile.',
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -309,7 +309,7 @@
- 'Legend:',
- ' Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd '
- 'Quartile.',
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -352,7 +352,7 @@
- 'Legend:',
- ' Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd '
- 'Quartile.',
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -370,7 +370,7 @@
- "* benchmark 'test_y.py::test_a[[]1[]]': 1 tests *",
- "* benchmark 'test_y.py::test_b[[]0[]]': 1 tests *",
- "* benchmark 'test_y.py::test_b[[]1[]]': 1 tests *",
-- '============* 8 passed * ============*',
-+ '============* 8 passed* ============*',
- ])
-
-
-@@ -403,7 +403,7 @@
- "test_fast *",
- "test_slow *",
- "------*",
-- "*====== 2 passed * ======*",
-+ "*====== 2 passed* ======*",
- ])
-
-
-@@ -429,7 +429,7 @@
- "test_fast * 1 *",
- "test_slow * 1 *",
- "------*",
-- "*====== 3 passed * ======*",
-+ "*====== 3 passed* ======*",
- ])
-
-
-@@ -445,7 +445,7 @@
- "test_fast * 5 *",
- "test_slow * 5 *",
- "------*",
-- "*====== 3 passed * ======*",
-+ "*====== 3 passed* ======*",
- ])
-
-
-@@ -698,6 +698,11 @@
-
-
- def test_histogram(testdir):
-+ try:
-+ import pygal, pygaljs
-+ except ImportError:
-+ pytest.skip("No pygal or pygaljs module")
-+
- test = testdir.makepyfile(SIMPLE_TEST)
- result = testdir.runpytest_subprocess('--doctest-modules', '--benchmark-histogram=foobar',
- '--benchmark-max-time=0.0000001', test)
-@@ -740,7 +745,7 @@
- "test_fast *",
- "test_slow *",
- "------*",
-- "*====== 2 passed * ======*",
-+ "*====== 2 passed* ======*",
- ])
-
-
-@@ -756,7 +761,7 @@
- "test_fast *",
- "test_slow *",
- "------*",
-- "*====== 2 passed * ======*",
-+ "*====== 2 passed* ======*",
- ])
-
-
-@@ -782,7 +787,7 @@
- "test_fast *",
- "test_slow *",
- "------*",
-- "*====== 2 passed * ======*",
-+ "*====== 2 passed* ======*",
- ])
-
-
-@@ -1017,7 +1022,7 @@
- "test_* *",
- "------*",
- "",
-- "*====== 5 passed * ======*",
-+ "*====== 5 passed* ======*",
- ])
-
-
-@@ -1031,7 +1036,7 @@
- "test_skip.py::test_slower SKIPPED*",
- "test_skip.py::test_xfast SKIPPED*",
- "test_skip.py::test_fast SKIPPED*",
-- "*====== 1 passed, 4 skipped * ======*",
-+ "*====== 1 passed, 4 skipped* ======*",
- ])
-
-
-@@ -1045,7 +1050,7 @@
- "test_disable.py::test_slower PASSED*",
- "test_disable.py::test_xfast PASSED*",
- "test_disable.py::test_fast PASSED*",
-- "*====== 5 passed * ======*",
-+ "*====== 5 passed* ======*",
- ])
-
-
-@@ -1060,7 +1065,7 @@
- "------*",
- "test_xfast *",
- "------*",
-- "*====== 1 passed, 4 deselected * ======*",
-+ "*====== 1 passed, 4 deselected* ======*",
- ])
-
-
-@@ -1082,7 +1087,7 @@
- "test_* *",
- "test_* *",
- "------*",
-- "*====== 4 passed, 1 skipped * ======*",
-+ "*====== 4 passed, 1 skipped* ======*",
- ])
-
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-benchmark.git/commitdiff/4385479f3c0f418800b32d63271ab0e928147103
More information about the pld-cvs-commit
mailing list