forked from pool/python-pytest-profiling
- Switch to pyproject macros.
- Less globs in %files. - Clean up Python 2 leftovers. - Edit python-pytest-profiling-no-six.patch to also drop the install_requires. - Add patch fix-mock-call.patch: * Correct mocking call to be assert_called_with(). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-profiling?expand=0&rev=9
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pytest-profiling
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# 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
|
||||
@@ -16,22 +16,23 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without python2
|
||||
Name: python-pytest-profiling
|
||||
Version: 1.7.0
|
||||
Release: 0
|
||||
Summary: Profiling plugin for pytest
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/manahl/pytest-plugins
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-profiling/pytest-profiling-%{version}.tar.gz
|
||||
# PATCH-FEATURE-UPSTREAM pytest-fixtures-pr171-remove-mock.patch -- gh#man-group#pytest-plugins#171
|
||||
Patch0: pytest-fixtures-pr171-remove-mock.patch
|
||||
# https://github.com/man-group/pytest-plugins/issues/209
|
||||
Patch1: python-pytest-profiling-no-six.patch
|
||||
# PATCH-FIX-UPSTREAM Based on gh#man-group/pytest-plugins#223
|
||||
Patch2: fix-mock-call.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools-git}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-gprof2dot
|
||||
@@ -42,9 +43,6 @@ BuildRequires: %{python_module gprof2dot}
|
||||
BuildRequires: %{python_module more-itertools}
|
||||
BuildRequires: %{python_module pytest-virtualenv}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-mock
|
||||
%endif
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@@ -57,10 +55,10 @@ Profiling plugin for py.test
|
||||
sed -i 's/more-itertools==5.0.0/more-itertools/' tests/integration/test_profile_integration.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -70,8 +68,8 @@ sed -i 's/more-itertools==5.0.0/more-itertools/' tests/integration/test_profile_
|
||||
%files %{python_files}
|
||||
%doc CHANGES.md README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/pytest_profiling.py*
|
||||
%{python_sitelib}/pytest_profiling.py
|
||||
%pycache_only %{python_sitelib}/__pycache__/pytest_profiling*.pyc
|
||||
%{python_sitelib}/pytest_profiling-%{version}*-info
|
||||
%{python_sitelib}/pytest_profiling-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user