diff --git a/python-pytest-cov.changes b/python-pytest-cov.changes index 3fa5ed1..c7c2ef0 100644 --- a/python-pytest-cov.changes +++ b/python-pytest-cov.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jul 17 20:14:59 UTC 2022 - Ben Greiner + +- Add support-setuptools60.patch gh#pytest-dev/pytest-cov#545 + ------------------------------------------------------------------- Mon Dec 20 01:21:53 UTC 2021 - Steve Kowalik diff --git a/python-pytest-cov.spec b/python-pytest-cov.spec index e942222..ce8dbe8 100644 --- a/python-pytest-cov.spec +++ b/python-pytest-cov.spec @@ -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 diff --git a/support-setuptools60.patch b/support-setuptools60.patch new file mode 100644 index 0000000..832205c --- /dev/null +++ b/support-setuptools60.patch @@ -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