Sync from SUSE:ALP:Source:Standard:1.0 saltbundlepy-setuptools revision eb0aba31241a671295daa2a28c4ddfd5

This commit is contained in:
Adrian Schröter 2024-07-15 12:59:23 +02:00
commit 0fe29870ee
7 changed files with 3012 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,21 @@
Index: setuptools-65.5.1/setuptools/_distutils/sysconfig.py
===================================================================
--- setuptools-65.5.1.orig/setuptools/_distutils/sysconfig.py
+++ setuptools-65.5.1/setuptools/_distutils/sysconfig.py
@@ -238,9 +238,13 @@ def get_python_lib(plat_specific=0, stan
if os.name == "posix":
if plat_specific or standard_lib:
- # Platform-specific modules (any module from a non-pure-Python
- # module distribution) or standard Python library modules.
- libdir = getattr(sys, "platlibdir", "lib")
+ # Python 3.8 doesn't have sys.platlibdir
+ if sys.version_info < (3, 9):
+ libdir = get_config_var("platsubdir") or "lib"
+ else:
+ # Platform-specific modules (any module from a non-pure-Python
+ # module distribution) or standard Python library modules.
+ libdir = getattr(sys, "platlibdir", "lib")
else:
# Pure Python
libdir = "lib"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
#
# spec file for package saltbundlepy-setuptools
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
# Disable python bytecompile for all distros
# It's called explicitly in the spec
%global __brp_python_bytecompile %{nil}
Name: saltbundlepy-setuptools
Version: 67.7.2
Release: 0
Summary: Enhancements to distutils for building and distributing Python packages
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pypa/setuptools
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
Patch0: sort-for-reproducibility.patch
# PATCH-FIX-OPENSUSE fix-get-python-lib-python38.patch bsc#1204395
Patch2: fix-get-python-lib-python38.patch
# PATCH-FIX-UPSTREAM gh#pypa/setuptools#3917
Patch3: use-tarfile-extraction_filter.patch
BuildRequires: %{saltbundlepy_module base >= 3.10}
BuildRequires: fdupes
BuildRequires: saltbundlepy-rpm-macros
BuildRequires: unzip
# The dependency download feature may require SSL, which is in python3-base and python(2)
Requires: saltbundlepy-base
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: python-distribute = %{version}
Obsoletes: python-distribute < %{version}
BuildArch: noarch
%python_subpackages
%description
setuptools is a collection of enhancements to the Python distutils that
allow you to build and distribute Python packages,
especially ones that have dependencies on other packages.
%prep
%autosetup -p1 -n setuptools-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%defattr(-,root,root)
%license LICENSE
%doc CHANGES.rst README.rst
%{python_sitelib}/setuptools
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
%dir %{python_sitelib}/pkg_resources
%{python_sitelib}/pkg_resources/*
%{python_sitelib}/_distutils_hack
%{python_sitelib}/distutils-precedence.pth
%changelog

BIN
setuptools-67.7.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,90 @@
---
setuptools/command/easy_install.py | 2 +-
setuptools/command/egg_info.py | 2 +-
setuptools/dist.py | 2 +-
setuptools/tests/test_egg_info.py | 2 +-
setuptools/tests/test_wheel.py | 8 ++++----
5 files changed, 8 insertions(+), 8 deletions(-)
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -419,7 +419,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)):
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -694,7 +694,7 @@ def _write_requirements(stream, reqs):
def append_cr(line):
return line + '\n'
- lines = map(append_cr, lines)
+ lines = map(append_cr, sorted(lines))
stream.writelines(lines)
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -221,7 +221,7 @@ def write_pkg_file(self, file): # noqa:
if self.long_description_content_type:
write_field('Description-Content-Type', 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)
self._write_list(file, 'License-File', self.license_files or [])
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -304,8 +304,8 @@ class TestEggInfo:
wheel>=0.5
pytest
- wheel>=0.5
pytest
+ wheel>=0.5
''',
'''
--- a/setuptools/tests/test_wheel.py
+++ b/setuptools/tests/test_wheel.py
@@ -423,30 +423,30 @@ WHEEL_INSTALL_TESTS = (
dict(
id='requires_ensure_order',
install_requires='''
- foo
bar
baz
+ foo
qux
''',
extras_require={
'extra': '''
- foobar>3
barbaz>4
bazqux>5
+ foobar>3
quxzap>6
''',
},
requires_txt=DALS(
'''
- foo
bar
baz
+ foo
qux
[extra]
- foobar>3
barbaz>4
bazqux>5
+ foobar>3
quxzap>6
'''
),

View File

@ -0,0 +1,26 @@
From 788a7601c88db28435a70e5bb17e6eba23a31e4c Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 3 May 2023 12:02:19 +1000
Subject: [PATCH] tests: Add extraction_filter for tarfile
Python 3.12, and earlier via security backports now issue an
DeprecationWarning when calling tarfile.extractall without an extraction
filter set. Since the only place we've called extractall is literally
right after we've created the archive, use a fully trusted filter. This
can be replaced with a filter argument to extractall in future.
---
setuptools/tests/test_easy_install.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index bca86066ad..edc9af8252 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -615,6 +615,7 @@ def test_setup_requires_override_nspkg(self, use_setup_cfg):
foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1')
os.mkdir(foobar_1_dir)
with tarfile.open(foobar_1_archive) as tf:
+ tf.extraction_filter = (lambda member, path: member)
tf.extractall(foobar_1_dir)
sys.path.insert(1, foobar_1_dir)