forked from pool/python-setuptools
Accepting request 748817 from devel:languages:python
- 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) - 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. - Try to use system packages rather than the vendored variants - 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 - 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/748817 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-setuptools?expand=0&rev=56
This commit is contained in:
39
importlib.patch
Normal file
39
importlib.patch
Normal file
@@ -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)
|
@@ -1,3 +1,46 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 12:47:57 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- 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 <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- 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 <tchvatal@suse.com>
|
||||
|
||||
- Try to use system packages rather than the vendored variants
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 16 11:55:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- 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 <mcalabkova@suse.com>
|
||||
|
||||
- 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 <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -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}
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:66b86bbae7cc7ac2e867f52dc08a6bd064d938bac59dfec71b9b565dd36d6012
|
||||
size 851251
|
3
setuptools-41.6.0.zip
Normal file
3
setuptools-41.6.0.zip
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6afa61b391dcd16cb8890ec9f66cc4015a8a31a6e1c2b4e0c464514be1a3d722
|
||||
size 852541
|
53
sort-for-reproducibility.patch
Normal file
53
sort-for-reproducibility.patch
Normal file
@@ -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
|
||||
''',
|
||||
|
||||
'''
|
Reference in New Issue
Block a user