Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Uyuni:Master:Debian12-Uyuni-Client-Tools:Build-Dependencies
saltbundlepy-setuptools
remove-more-itertools-dependency-cycle.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-more-itertools-dependency-cycle.patch of Package saltbundlepy-setuptools
From: Antonio Larrosa <alarrosa@suse.com> Subject: Remove dependency on more_itertools which generates a dependency cycle setuptools buildrequires more_itertools just for one simple function (unique_everseen) and more_itertools buildrequires setuptools, so in order to remove the cycle, the unique_everseen function is copied here so that it can be used without buildrequiring the external package. --- setuptools/command/build_py.py | 2 +- setuptools/command/test.py | 2 +- setuptools/dist.py | 2 +- setuptools/extern/__init__.py | 2 +- setuptools/more_itertools.py | 19 +++++++++++++++++++ setuptools/msvc.py | 2 +- setuptools/package_index.py | 2 +- 7 files changed, 25 insertions(+), 6 deletions(-) --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,7 +8,7 @@ import io import distutils.errors import itertools import stat -from setuptools.extern.more_itertools import unique_everseen +from setuptools.more_itertools import unique_everseen try: from setuptools.lib2to3_ex import Mixin2to3 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -12,7 +12,7 @@ from pkg_resources import (resource_list working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command -from setuptools.extern.more_itertools import unique_everseen +from setuptools.more_itertools import unique_everseen class ScanningLoader(TestLoader): --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -29,7 +29,7 @@ from distutils.version import StrictVers from setuptools.extern import packaging from setuptools.extern import ordered_set -from setuptools.extern.more_itertools import unique_everseen +from setuptools.more_itertools import unique_everseen from . import SetuptoolsDeprecationWarning --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -69,5 +69,5 @@ class VendorImporter: sys.meta_path.append(self) -names = 'packaging', 'pyparsing', 'ordered_set', 'more_itertools', +names = 'packaging', 'pyparsing', 'ordered_set' VendorImporter(__name__, names, 'setuptools._vendor').install() --- /dev/null +++ b/setuptools/more_itertools.py @@ -0,0 +1,19 @@ +def unique_everseen(iterable, key=None): + """Yield unique elements, preserving order.""" + + seenset = set() + seenset_add = seenset.add + seenlist = [] + seenlist_add = seenlist.append + use_key = key is not None + + for element in iterable: + k = key(element) if use_key else element + try: + if k not in seenset: + seenset_add(k) + yield element + except TypeError: + if k not in seenlist: + seenlist_add(k) + yield element --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -30,7 +30,7 @@ import itertools import subprocess import distutils.errors from setuptools.extern.packaging.version import LegacyVersion -from setuptools.extern.more_itertools import unique_everseen +from setuptools.more_itertools import unique_everseen from .monkey import get_unpatched --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -27,7 +27,7 @@ from distutils import log from distutils.errors import DistutilsError from fnmatch import translate from setuptools.wheel import Wheel -from setuptools.extern.more_itertools import unique_everseen +from setuptools.more_itertools import unique_everseen EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor