diff --git a/importlib.patch b/importlib.patch new file mode 100644 index 0000000..00455bb --- /dev/null +++ b/importlib.patch @@ -0,0 +1,39 @@ +Index: setuptools-41.6.0/setuptools/_imp.py +=================================================================== +--- setuptools-41.6.0.orig/setuptools/_imp.py ++++ setuptools-41.6.0/setuptools/_imp.py +@@ -19,7 +19,10 @@ PY_FROZEN = 7 + + def find_module(module, paths=None): + """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) ++ else: ++ spec = importlib.util.find_spec(module, paths) + if spec is None: + raise ImportError("Can't find %s" % module) + if not spec.has_location and hasattr(spec, 'submodule_search_locations'): +@@ -60,14 +63,20 @@ def find_module(module, paths=None): + + + 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) ++ else: ++ spec = importlib.util.find_spec(module, paths) + if not spec: + raise ImportError("Can't find %s" % module) + return spec.loader.get_code(module) + + + 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) ++ else: ++ spec = importlib.util.find_spec(module, paths) + if not spec: + raise ImportError("Can't find %s" % module) + return module_from_spec(spec) diff --git a/python-setuptools.changes b/python-setuptools.changes index a247384..5b3df73 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Mon Nov 11 12:47:57 UTC 2019 - Ondřej Súkup + +- update to 41.6.0 +- add importlib.patch + * Replace usage of deprecated imp module with local + re-implementation in setuptools._imp + * Fix pkg_resources.Requirement hash/equality implementation + * Fix tests when running under python3.10. + * drop 'deprecated' documentation (test command, ez_setup, EasyInstall) + +------------------------------------------------------------------- +Thu Oct 17 20:35:06 UTC 2019 - Stefan Brüns + +- Remove runtime dependency for the full python3 package, as the + actually required SSL module is in python3-base. For python(2), + SSL is in the "full" python package. Avoids build loops and + shortens the dependency chain for e.g. rust. + +------------------------------------------------------------------- +Wed Oct 16 13:58:35 UTC 2019 - Tomáš Chvátal + +- Try to use system packages rather than the vendored variants + +------------------------------------------------------------------- +Wed Oct 16 11:55:57 UTC 2019 - Tomáš Chvátal + +- Add patch to sort outputs for better reproducability: + * sort-for-reproducibility.patch +- Add missing dep on ordered-set as it is now in the vendored + dir too + +------------------------------------------------------------------- +Fri Oct 11 09:29:35 UTC 2019 - Marketa Calabkova + +- Update to 41.4.0 + * In declarative config, now traps errors when invalid python_requires + values are supplied. + * When storing extras, rely on OrderedSet to retain order of extras + as indicated by the packager, which will also be deterministic + on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+. + * Fixed failing integration test triggered by 'long_description_content_type' in packaging. + ------------------------------------------------------------------- Sat Sep 14 02:08:41 UTC 2019 - John Vandenberg diff --git a/python-setuptools.spec b/python-setuptools.spec index 0496617..c7b895f 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,7 +1,7 @@ # # spec file for package python-setuptools # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,25 +27,32 @@ %bcond_with test %endif Name: python-setuptools%{psuffix} -Version: 41.2.0 +Version: 41.6.0 Release: 0 Summary: Enhancements to distutils for building and distributing Python packages License: Python-2.0 OR ZPL-2.0 -Group: Development/Languages/Python URL: https://github.com/pypa/setuptools Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip Source1: psfl.txt Source2: zpl.txt +Patch0: sort-for-reproducibility.patch +Patch1: importlib.patch BuildRequires: %{python_module appdirs} +BuildRequires: %{python_module ordered-set} BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pyparsing >= 2.0.2} BuildRequires: %{python_module six} BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip -# needed for SLE +# The dependency download feature may require SSL, which is in python3-base and python(2) +%ifpython2 Requires: python +%endif Requires: python-appdirs +Requires: python-base +Requires: python-ordered-set Requires: python-packaging Requires: python-six Requires: python-xml @@ -57,17 +64,12 @@ BuildRequires: %{python_module Paver} BuildRequires: %{python_module devel} BuildRequires: %{python_module mock} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pyparsing >= 2.0.2} BuildRequires: %{python_module pytest-fixture-config} BuildRequires: %{python_module pytest-virtualenv} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= %{version}} BuildRequires: %{python_module wheel} BuildRequires: python-futures -%else -#!BuildIgnore: python-pyparsing -#!BuildIgnore: python2-pyparsing -#!BuildIgnore: python3-pyparsing %endif %if 0%{?suse_version} || 0%{?fedora_version} >= 24 Recommends: ca-certificates-mozilla @@ -85,6 +87,8 @@ especially ones that have dependencies on other packages. %prep %setup -q -n setuptools-%{version} +%patch0 -p1 +%patch1 -p1 find . -type f -name "*.orig" -delete # fix rpmlint spurious-executable-perm @@ -98,6 +102,21 @@ chmod -x README.rst # replace with nothing sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py +# replace the bundled stuff +find ./ -type f -name \*.py -exec sed -i \ + -e 's:from setuptools\.extern\.:from :g' \ + -e 's:from pkg_resources\.extern\.:from :g' \ + -e 's:pkg_resources\.extern\.::g' \ + -e 's:setuptools\.extern\.::g' \ + {} \; +find ./ -type f -name \*.py -exec sed -i \ + -e 's:from setuptools\.extern ::g' \ + -e 's:from pkg_resources\.extern ::g' \ + {} \; +find ./ -type f -name \*.py -exec sed -i \ + -e 's:from .extern ::g' \ + {} \; + %build %python_build @@ -110,8 +129,10 @@ sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py %check %if %{with test} +# the 4 skipped test rely on the bundled packages but they are +# not available on virtualenv; this is expected behaviour export LANG=en_US.UTF-8 -%pytest +%pytest -k 'not (test_clean_env_install or test_pip_upgrade_from_source or test_test_command_install_requirements or test_no_missing_dependencies)' %endif %if !%{with test} diff --git a/setuptools-41.2.0.zip b/setuptools-41.2.0.zip deleted file mode 100644 index d1361fe..0000000 --- a/setuptools-41.2.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66b86bbae7cc7ac2e867f52dc08a6bd064d938bac59dfec71b9b565dd36d6012 -size 851251 diff --git a/setuptools-41.6.0.zip b/setuptools-41.6.0.zip new file mode 100644 index 0000000..d26e7cc --- /dev/null +++ b/setuptools-41.6.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6afa61b391dcd16cb8890ec9f66cc4015a8a31a6e1c2b4e0c464514be1a3d722 +size 852541 diff --git a/sort-for-reproducibility.patch b/sort-for-reproducibility.patch new file mode 100644 index 0000000..a8d6872 --- /dev/null +++ b/sort-for-reproducibility.patch @@ -0,0 +1,53 @@ +Index: setuptools-41.4.0/setuptools/command/easy_install.py +=================================================================== +--- setuptools-41.4.0.orig/setuptools/command/easy_install.py ++++ setuptools-41.4.0/setuptools/command/easy_install.py +@@ -417,7 +417,7 @@ class easy_install(Command): + for spec in self.args: + self.easy_install(spec, not self.no_deps) + if self.record: +- outputs = self.outputs ++ outputs = list(sorted(self.outputs)) + if self.root: # strip any package prefix + root_len = len(self.root) + for counter in range(len(outputs)): +Index: setuptools-41.4.0/setuptools/command/egg_info.py +=================================================================== +--- setuptools-41.4.0.orig/setuptools/command/egg_info.py ++++ setuptools-41.4.0/setuptools/command/egg_info.py +@@ -638,7 +638,7 @@ def warn_depends_obsolete(cmd, basename, + def _write_requirements(stream, reqs): + lines = yield_lines(reqs or ()) + append_cr = lambda line: line + '\n' +- lines = map(append_cr, lines) ++ lines = map(append_cr, sorted(lines)) + stream.writelines(lines) + + +Index: setuptools-41.4.0/setuptools/dist.py +=================================================================== +--- setuptools-41.4.0.orig/setuptools/dist.py ++++ setuptools-41.4.0/setuptools/dist.py +@@ -195,7 +195,7 @@ def write_pkg_file(self, file): + self.long_description_content_type + ) + if self.provides_extras: +- for extra in self.provides_extras: ++ for extra in sorted(self.provides_extras): + write_field('Provides-Extra', extra) + + +Index: setuptools-41.4.0/setuptools/tests/test_egg_info.py +=================================================================== +--- setuptools-41.4.0.orig/setuptools/tests/test_egg_info.py ++++ setuptools-41.4.0/setuptools/tests/test_egg_info.py +@@ -291,8 +291,8 @@ class TestEggInfo: + wheel>=0.5 + pytest + +- wheel>=0.5 + pytest ++ wheel>=0.5 + ''', + + '''