From f46ea89c289e6c2f1389f495a4a7f77c2474b4b1ee901dd73359c5f93133279c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 11 Oct 2019 09:46:40 +0000 Subject: [PATCH 1/8] Accepting request 737429 from home:mcalabkova:branches:devel:languages:python - 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. OBS-URL: https://build.opensuse.org/request/show/737429 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=180 --- python-setuptools.changes | 11 +++++++++++ python-setuptools.spec | 2 +- setuptools-41.2.0.zip | 3 --- setuptools-41.4.0.zip | 3 +++ 4 files changed, 15 insertions(+), 4 deletions(-) delete mode 100644 setuptools-41.2.0.zip create mode 100644 setuptools-41.4.0.zip diff --git a/python-setuptools.changes b/python-setuptools.changes index a247384..f372414 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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..de82424 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -27,7 +27,7 @@ %bcond_with test %endif Name: python-setuptools%{psuffix} -Version: 41.2.0 +Version: 41.4.0 Release: 0 Summary: Enhancements to distutils for building and distributing Python packages License: Python-2.0 OR ZPL-2.0 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.4.0.zip b/setuptools-41.4.0.zip new file mode 100644 index 0000000..be7deeb --- /dev/null +++ b/setuptools-41.4.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d +size 855608 From 274c3cbad5dc7ab5366296839fac75e8e47e2082e6dc28e06bf31320caa22965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 16 Oct 2019 12:00:39 +0000 Subject: [PATCH 2/8] - 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=181 --- python-setuptools.changes | 8 +++++++ python-setuptools.spec | 5 ++++- sort-for-reproducibility.patch | 39 ++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 sort-for-reproducibility.patch diff --git a/python-setuptools.changes b/python-setuptools.changes index f372414..d8ff5d8 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/python-setuptools.spec b/python-setuptools.spec index de82424..27cbb11 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -31,12 +31,13 @@ Version: 41.4.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 BuildRequires: %{python_module appdirs} +BuildRequires: %{python_module ordered-set} BuildRequires: %{python_module packaging} BuildRequires: %{python_module six} BuildRequires: %{python_module xml} @@ -46,6 +47,7 @@ BuildRequires: unzip # needed for SLE Requires: python Requires: python-appdirs +Requires: python-ordered-set Requires: python-packaging Requires: python-six Requires: python-xml @@ -85,6 +87,7 @@ especially ones that have dependencies on other packages. %prep %setup -q -n setuptools-%{version} +%patch0 -p1 find . -type f -name "*.orig" -delete # fix rpmlint spurious-executable-perm diff --git a/sort-for-reproducibility.patch b/sort-for-reproducibility.patch new file mode 100644 index 0000000..131279c --- /dev/null +++ b/sort-for-reproducibility.patch @@ -0,0 +1,39 @@ +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) + + From 47c8c7ab2013735df11d51a6b10783525f6996f38f9c28148df9b06236ecca2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 16 Oct 2019 14:24:01 +0000 Subject: [PATCH 3/8] - Try to use system packages rather than the vendored variants OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=182 --- python-setuptools.changes | 5 +++++ python-setuptools.spec | 21 ++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/python-setuptools.changes b/python-setuptools.changes index d8ff5d8..f517e8c 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/python-setuptools.spec b/python-setuptools.spec index 27cbb11..f57b7a4 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -39,6 +39,7 @@ Patch0: sort-for-reproducibility.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 @@ -59,17 +60,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 @@ -101,6 +97,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 From d3d6dc0eec7f883d77dfd2666306b732ce91147b8f2207db9441010f063cdda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 17 Oct 2019 08:51:25 +0000 Subject: [PATCH 4/8] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=183 --- python-setuptools.spec | 4 +++- sort-for-reproducibility.patch | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/python-setuptools.spec b/python-setuptools.spec index f57b7a4..7f4eeb2 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -124,8 +124,10 @@ find ./ -type f -name \*.py -exec sed -i \ %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/sort-for-reproducibility.patch b/sort-for-reproducibility.patch index 131279c..a8d6872 100644 --- a/sort-for-reproducibility.patch +++ b/sort-for-reproducibility.patch @@ -37,3 +37,17 @@ Index: setuptools-41.4.0/setuptools/dist.py 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 + ''', + + ''' From 211f51d1c0287a4646243d06b251ad6d68c8aa2d2f8331b831bfba25eaa60998 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 18 Oct 2019 14:05:58 +0000 Subject: [PATCH 5/8] Accepting request 740901 from home:StefanBruens:branches:devel:languages:python - 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. OBS-URL: https://build.opensuse.org/request/show/740901 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=184 --- python-setuptools.changes | 8 ++++++++ python-setuptools.spec | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/python-setuptools.changes b/python-setuptools.changes index f517e8c..59b71d3 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/python-setuptools.spec b/python-setuptools.spec index 7f4eeb2..fff6316 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -45,9 +45,12 @@ 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 From 5360121d5539c2db7315509961ca3f8347010de9cce60e5ebdc24bddae9a6c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Mon, 11 Nov 2019 12:50:31 +0000 Subject: [PATCH 6/8] - update to 41.6.0 * 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) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=185 --- python-setuptools.changes | 10 ++++++++++ python-setuptools.spec | 2 +- setuptools-41.4.0.zip | 3 --- setuptools-41.6.0.zip | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 setuptools-41.4.0.zip create mode 100644 setuptools-41.6.0.zip diff --git a/python-setuptools.changes b/python-setuptools.changes index 59b71d3..b91c565 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Nov 11 12:47:57 UTC 2019 - Ondřej Súkup + +- update to 41.6.0 + * 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 diff --git a/python-setuptools.spec b/python-setuptools.spec index fff6316..9c3b963 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -27,7 +27,7 @@ %bcond_with test %endif Name: python-setuptools%{psuffix} -Version: 41.4.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 diff --git a/setuptools-41.4.0.zip b/setuptools-41.4.0.zip deleted file mode 100644 index be7deeb..0000000 --- a/setuptools-41.4.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d -size 855608 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 From 19008835914a1df1e77843fd0cdd4fe9dd32b029223123f7875574801cf9d649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Fri, 15 Nov 2019 07:49:54 +0000 Subject: [PATCH 7/8] - add importlib.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=186 --- imporlib.patch | 39 +++++++++++++++++++++++++++++++++++++++ python-setuptools.changes | 1 + python-setuptools.spec | 4 +++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 imporlib.patch diff --git a/imporlib.patch b/imporlib.patch new file mode 100644 index 0000000..0264fa3 --- /dev/null +++ b/imporlib.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 b91c565..5b3df73 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -2,6 +2,7 @@ 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 diff --git a/python-setuptools.spec b/python-setuptools.spec index 9c3b963..6bde333 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 @@ -36,6 +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 BuildRequires: %{python_module appdirs} BuildRequires: %{python_module ordered-set} BuildRequires: %{python_module packaging} @@ -87,6 +88,7 @@ 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 From 9334e9c0891260e5221196f0cfd46968dbc1c6b9b171757a3e4164c1e321e5a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Fri, 15 Nov 2019 08:58:26 +0000 Subject: [PATCH 8/8] fix name of patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=187 --- imporlib.patch => importlib.patch | 6 +++--- python-setuptools.spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename imporlib.patch => importlib.patch (85%) diff --git a/imporlib.patch b/importlib.patch similarity index 85% rename from imporlib.patch rename to importlib.patch index 0264fa3..00455bb 100644 --- a/imporlib.patch +++ b/importlib.patch @@ -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: diff --git a/python-setuptools.spec b/python-setuptools.spec index 6bde333..c7b895f 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -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}