Accepting request 989749 from home:bnavigator:branches:devel:languages:python:pytest

- Add support-setuptools60.patch gh#pytest-dev/pytest-cov#545

OBS-URL: https://build.opensuse.org/request/show/989749
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-cov?expand=0&rev=32
This commit is contained in:
2022-07-18 11:31:26 +00:00
committed by Git OBS Bridge
parent 5b9207a2df
commit 6a8e371bcc
3 changed files with 36 additions and 7 deletions

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