1
0
python-pytest-benchmark/python-pytest-benchmark.spec
Matej Cepl a18e679f0f Accepting request 965498 from home:bnavigator:branches:devel:languages:python:pytest
- Update to 3.4.1
  * Disable progress indication unless --benchmark-verbose is used.
    Contributed by Dimitris Rozakis in #149.
  * Added Python 3.9, dropped Python 3.5. Contributed by Miroslav
    Šedivý in #189.
  * Changed the "cpu" data in the json output to include everything
    that cpuinfo outputs, for better or worse as cpuinfo 6.0
    changed some fields. Users should now ensure they are an
    adequate cpuinfo package installed. MAY BE BACKWARDS
    INCOMPATIBLE
  * Changed behavior of --benchmark-skip and --benchmark-only to
    apply early in the collection phase. This means skipped tests
    won't make pytest run fixtures for said tests unnecessarily,
    but unfortunately this also means the skipping behavior will be
    applied to any tests that requires a "benchmark" fixture,
    regardless if it would come from pytest-benchmark or not. MAY
    BE BACKWARDS INCOMPATIBLE
  * Added --benchmark-quiet - option to disable reporting and other
    information output.
  * Squelched unnecessary warning when --benchmark-disable and save
    options are used. Fixes #199.
  * PerformanceRegression exception no longer inherits
    pytest.UsageError (apparently a final class).

OBS-URL: https://build.opensuse.org/request/show/965498
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-benchmark?expand=0&rev=19
2022-03-31 12:55:12 +00:00

91 lines
2.9 KiB
RPMSpec

#
# spec file for package python-pytest-benchmark
#
# Copyright (c) 2022 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-pytest-benchmark
Version: 3.4.1
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
Patch0: fix-test-fast.patch
BuildRequires: %{python_module aspectlib}
BuildRequires: %{python_module elasticsearch}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module py-cpuinfo}
BuildRequires: %{python_module pygaljs}
BuildRequires: %{python_module pygal}
BuildRequires: %{python_module pytest >= 3.8}
BuildRequires: %{python_module setuptools}
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
%setup -q -n pytest-benchmark-%{version}
%autopatch -p1
# 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
%python_build
%install
%python_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