forked from pool/python-setuptools
- Update to 72.1.0:
* Restore the tests command and deprecate access to the module.
* Added return types to typed public functions.
* Removed lingering unused code around Distribution._patched_dist.
* Reset the backports module when enabling vendored packages.
* Include all vendored files in the sdist.
* Restored package data that went missing in 71.0. This change also
incidentally causes tests to be installed once again.
* Now setuptools declares its own dependencies in the core extra.
Dependencies are still vendored for bootstrapping purposes, but
setuptools will prefer installed dependencies if present. The core
extra is used for informational purposes and should *not* be declared
in package metadata (e.g. build-requires).
* Support for loading distutils from the standard library is now
deprecated, including use of SETUPTOOLS_USE_DISTUTILS=stdlib and
importing distutils before importing setuptools.
* Fix distribution name normalisation for valid versions that are not
canonical (e.g. 1.0-2).
+ Modernized and refactored VCS handling in package_index.
(bsc#1228105, CVE-2024-6345)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=267
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
3020
python-setuptools.changes
Normal file
3020
python-setuptools.changes
Normal file
File diff suppressed because it is too large
Load Diff
154
python-setuptools.spec
Normal file
154
python-setuptools.spec
Normal file
@@ -0,0 +1,154 @@
|
||||
#
|
||||
# spec file for package python-setuptools
|
||||
#
|
||||
# Copyright (c) 2024 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/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%endif
|
||||
%if "%{flavor}" == ""
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
# in order to avoid rewriting for subpackage generator
|
||||
%define mypython python
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-setuptools%{psuffix}
|
||||
Version: 72.1.0
|
||||
Release: 0
|
||||
Summary: Download, build, install, upgrade, and uninstall Python packages
|
||||
License: Apache-2.0 AND MIT AND BSD-2-Clause AND Python-2.0
|
||||
URL: https://github.com/pypa/setuptools
|
||||
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
|
||||
Patch0: sort-for-reproducibility.patch
|
||||
# Bootstrap: Don't BuildRequire pip here!
|
||||
BuildRequires: %{python_module base >= 3.9}
|
||||
# The rpm python-wheel build is bootstrap friendly since 0.42
|
||||
BuildRequires: %{python_module wheel >= 0.42}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module build}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module filelock >= 3.4.0}
|
||||
BuildRequires: %{python_module ini2toml-lite >= 0.9}
|
||||
BuildRequires: %{python_module jaraco.develop >= 7.21}
|
||||
BuildRequires: %{python_module jaraco.envs >= 2.2}
|
||||
BuildRequires: %{python_module jaraco.packaging >= 10.0}
|
||||
BuildRequires: %{python_module jaraco.path >= 3.2.0}
|
||||
BuildRequires: %{python_module jaraco.test}
|
||||
BuildRequires: %{python_module pip >= 19.1}
|
||||
BuildRequires: %{python_module pip-run >= 8.8}
|
||||
BuildRequires: %{python_module pytest >= 6}
|
||||
BuildRequires: %{python_module pytest-home}
|
||||
BuildRequires: %{python_module pytest-subprocess}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module setuptools = %{version}}
|
||||
BuildRequires: %{python_module setuptools-wheel = %{version}}
|
||||
BuildRequires: %{python_module tomli-w >= 1.0.0}
|
||||
BuildRequires: %{python_module virtualenv >= 13.0.0}
|
||||
%endif
|
||||
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
||||
Recommends: ca-certificates-mozilla
|
||||
%endif
|
||||
%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.
|
||||
|
||||
%package wheel
|
||||
Summary: The setuptools wheel for custom tests and install requirements
|
||||
Requires: %mypython(abi) = %python_version
|
||||
|
||||
%description wheel
|
||||
This packages provides the setuptools wheel as separate file for cases where
|
||||
the wheel needs to be used directly in test or install setups
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n setuptools-%{version}
|
||||
|
||||
# Remove bundled exes
|
||||
rm -f setuptools/*.exe
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%{python_expand # bootstrap with built-in pip
|
||||
$python -m venv build/env
|
||||
build/env/bin/python -m ensurepip
|
||||
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
|
||||
%{$python_pyproject_wheel}
|
||||
}
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%{python_expand # use pip bootstrapped above
|
||||
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
|
||||
%{$python_pyproject_install}
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
|
||||
}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%{python_expand # just use the last one from the expansion, they're all the same
|
||||
mkdir -p dist/
|
||||
cp %{$python_sitelib}/../wheels/setuptools-%{version}-py3-none-any.whl $PWD/dist/
|
||||
}
|
||||
export PRE_BUILT_SETUPTOOLS_WHEEL=$PWD/dist/setuptools-%{version}-py3-none-any.whl
|
||||
export LANG=en_US.UTF-8
|
||||
# tests need imports from local source dir
|
||||
export PYTHONPATH=$(pwd)
|
||||
# no online comparisons in obs
|
||||
donttest="(test_apply_pyproject_equivalent_to_setupcfg and https)"
|
||||
# test_pbr_integration tries to install pbr from network using pip
|
||||
donttest+=" or test_pbr_integration"
|
||||
# test_example_file_in_sdist wants wheel.whl
|
||||
donttest+=" or test_example_file_in_sdist"
|
||||
# looks for .exe files that we do not ship
|
||||
donttest+=" or test_wheel_includes_cli_scripts"
|
||||
%pytest -rfE -n auto -k "not ($donttest)"
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%if !%{with wheel}
|
||||
%license LICENSE
|
||||
%doc NEWS.rst README.rst
|
||||
%{python_sitelib}/setuptools
|
||||
%{python_sitelib}/setuptools-%{version}.dist-info
|
||||
%dir %{python_sitelib}/pkg_resources
|
||||
%{python_sitelib}/pkg_resources/*
|
||||
%{python_sitelib}/_distutils_hack
|
||||
%{python_sitelib}/distutils-precedence.pth
|
||||
%endif
|
||||
|
||||
%files %{python_files wheel}
|
||||
%dir %{python_sitelib}/../wheels
|
||||
%{python_sitelib}/../wheels/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
3
setuptools-70.1.1.tar.gz
Normal file
3
setuptools-70.1.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:937a48c7cdb7a21eb53cd7f9b59e525503aa8abaf3584c730dc5f7a5bec3a650
|
||||
size 2292324
|
||||
BIN
setuptools-72.1.0.tar.gz
LFS
Normal file
BIN
setuptools-72.1.0.tar.gz
LFS
Normal file
Binary file not shown.
60
sort-for-reproducibility.patch
Normal file
60
sort-for-reproducibility.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
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(-)
|
||||
|
||||
Index: setuptools-70.0.0/setuptools/command/easy_install.py
|
||||
===================================================================
|
||||
--- setuptools-70.0.0.orig/setuptools/command/easy_install.py
|
||||
+++ setuptools-70.0.0/setuptools/command/easy_install.py
|
||||
@@ -436,7 +436,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-70.0.0/setuptools/tests/test_wheel.py
|
||||
===================================================================
|
||||
--- setuptools-70.0.0.orig/setuptools/tests/test_wheel.py
|
||||
+++ setuptools-70.0.0/setuptools/tests/test_wheel.py
|
||||
@@ -411,30 +411,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
|
||||
"""
|
||||
),
|
||||
Reference in New Issue
Block a user