Accepting request 989859 from devel:languages:python:pytest

OBS-URL: https://build.opensuse.org/request/show/989859
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-cov?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2022-08-08 06:44:51 +00:00 committed by Git OBS Bridge
commit cf03ea42b6
3 changed files with 36 additions and 7 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Jul 17 20:14:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Add support-setuptools60.patch gh#pytest-dev/pytest-cov#545
-------------------------------------------------------------------
Mon Dec 20 01:21:53 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# 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
@ -31,22 +31,22 @@ Version: 3.0.0
Release: 0
Summary: Pytest plugin for coverage reporting
License: MIT
URL: https://github.com/schlamar/pytest-cov
URL: https://github.com/pytest-dev/pytest-cov
Source: https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-cov/issues/509
# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-cov#509
Patch0: support-coverage-62.patch
# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-cov#545
Patch1: support-setuptools60.patch
BuildRequires: %{python_module setuptools}
%if %{with test}
BuildRequires: %{python_module coverage >= 5.2.1}
BuildRequires: %{python_module fields}
BuildRequires: %{python_module process-tests}
%if %{with test}
BuildRequires: %{python_module hunter}
BuildRequires: %{python_module pytest >= 4.6.0}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module six}
BuildRequires: %{python_module virtualenv}
%endif
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-coverage >= 5.2.1

View File

@ -0,0 +1,24 @@
Index: pytest-cov-3.0.0/setup.py
===================================================================
--- pytest-cov-3.0.0.orig/setup.py
+++ pytest-cov-3.0.0/setup.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
import re
-from distutils.command.build import build
from glob import glob
from itertools import chain
from os.path import basename
@@ -12,6 +11,11 @@ from os.path import splitext
from setuptools import Command
from setuptools import find_packages
from setuptools import setup
+try:
+ # https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html
+ from setuptools.command.build import build
+except ImportError:
+ from distutils.command.build import build
from setuptools.command.develop import develop
from setuptools.command.easy_install import easy_install
from setuptools.command.install_lib import install_lib