Ondřej Súkup 2019-11-15 08:58:26 +00:00 committed by Git OBS Bridge
parent 1900883591
commit 9334e9c089
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ Index: setuptools-41.6.0/setuptools/_imp.py
"""Just like 'imp.find_module()', but with package support"""
- spec = importlib.util.find_spec(module, paths)
+ if isinstance(paths, list):
+ spec = importlib.machinery.PathFinder().find_spec(module, paths)
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
+ else:
+ spec = importlib.util.find_spec(module, paths)
if spec is None:
@ -20,7 +20,7 @@ Index: setuptools-41.6.0/setuptools/_imp.py
def get_frozen_object(module, paths=None):
- spec = importlib.util.find_spec(module, paths)
+ if isinstance(paths, list):
+ spec = importlib.machinery.PathFinder().find_spec(module, paths)
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
+ else:
+ spec = importlib.util.find_spec(module, paths)
if not spec:
@ -31,7 +31,7 @@ Index: setuptools-41.6.0/setuptools/_imp.py
def get_module(module, paths, info):
- spec = importlib.util.find_spec(module, paths)
+ if isinstance(paths, list):
+ spec = importlib.machinery.PathFinder().find_spec(module, paths)
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
+ else:
+ spec = importlib.util.find_spec(module, paths)
if not spec:

View File

@ -36,7 +36,7 @@ Source: https://files.pythonhosted.org/packages/source/s/setuptools/setu
Source1: psfl.txt
Source2: zpl.txt
Patch0: sort-for-reproducibility.patch
Patch1: imporlib.patch
Patch1: importlib.patch
BuildRequires: %{python_module appdirs}
BuildRequires: %{python_module ordered-set}
BuildRequires: %{python_module packaging}