Update to 60.9.3
- change license string - change wheel size test to 800 KiB (there are more bundled libraries) - backport upstream patches to run more tests without the internet connection
This commit is contained in:
parent
641bd7b73a
commit
748e1cb28e
43
Isolate-spawned-processes-by-unsetting-PYTHONPATH.patch
Normal file
43
Isolate-spawned-processes-by-unsetting-PYTHONPATH.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 395edd9c8f055005922b8e66a21ba9f0d2a7c2fd Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Thu, 24 Feb 2022 09:38:54 +0100
|
||||
Subject: [PATCH] Isolate spawned processes by unsetting PYTHONPATH
|
||||
|
||||
---
|
||||
setuptools/tests/environment.py | 5 +++++
|
||||
setuptools/tests/fixtures.py | 3 ++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
|
||||
index a0c0ec6..b0eac3a 100644
|
||||
--- a/setuptools/tests/environment.py
|
||||
+++ b/setuptools/tests/environment.py
|
||||
@@ -18,6 +18,11 @@ class VirtualEnv(jaraco.envs.VirtualEnv):
|
||||
def run(self, cmd, *args, **kwargs):
|
||||
cmd = [self.exe(cmd[0])] + cmd[1:]
|
||||
kwargs = {"cwd": self.root, **kwargs} # Allow overriding
|
||||
+ if "env" not in kwargs:
|
||||
+ env = dict(os.environ)
|
||||
+ if "PYTHONPATH" in env:
|
||||
+ del env["PYTHONPATH"]
|
||||
+ kwargs["env"] = env
|
||||
return subprocess.check_output(cmd, *args, **kwargs)
|
||||
|
||||
|
||||
diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
|
||||
index 7599e65..d61ffa4 100644
|
||||
--- a/setuptools/tests/fixtures.py
|
||||
+++ b/setuptools/tests/fixtures.py
|
||||
@@ -98,7 +98,8 @@ def venv(tmp_path, setuptools_wheel):
|
||||
env = environment.VirtualEnv()
|
||||
env.root = path.Path(tmp_path / 'venv')
|
||||
env.req = str(setuptools_wheel)
|
||||
- return env.create()
|
||||
+ with contexts.environment(PYTHONPATH=None):
|
||||
+ return env.create()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
--
|
||||
2.35.1
|
||||
|
45
Point-to-a-custom-pre-built-distribution-of-setuptools.patch
Normal file
45
Point-to-a-custom-pre-built-distribution-of-setuptools.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From d00beeefc6172036ecc17ad7945e80852d5210a5 Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Wed, 2 Mar 2022 11:42:41 +0100
|
||||
Subject: [PATCH] Point to a custom pre-built distribution of setuptools
|
||||
|
||||
---
|
||||
setuptools/tests/fixtures.py | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
|
||||
index d61ffa4..cc2d4d8 100644
|
||||
--- a/setuptools/tests/fixtures.py
|
||||
+++ b/setuptools/tests/fixtures.py
|
||||
@@ -1,7 +1,10 @@
|
||||
import contextlib
|
||||
+import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
+from pathlib import Path
|
||||
+
|
||||
import pytest
|
||||
import path
|
||||
|
||||
@@ -64,6 +67,8 @@ def sample_project(tmp_path):
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def setuptools_sdist(tmp_path_factory, request):
|
||||
+ if os.getenv("PRE_BUILT_SETUPTOOLS_SDIST"):
|
||||
+ return Path(os.getenv("PRE_BUILT_SETUPTOOLS_SDIST")).resolve()
|
||||
with contexts.session_locked_tmp_dir(
|
||||
request, tmp_path_factory, "sdist_build") as tmp:
|
||||
dist = next(tmp.glob("*.tar.gz"), None)
|
||||
@@ -79,6 +84,8 @@ def setuptools_sdist(tmp_path_factory, request):
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def setuptools_wheel(tmp_path_factory, request):
|
||||
+ if os.getenv("PRE_BUILT_SETUPTOOLS_WHEEL"):
|
||||
+ return Path(os.getenv("PRE_BUILT_SETUPTOOLS_WHEEL")).resolve()
|
||||
with contexts.session_locked_tmp_dir(
|
||||
request, tmp_path_factory, "wheel_build") as tmp:
|
||||
dist = next(tmp.glob("*.whl"), None)
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 4612fd1b6b7f9d3fdbfad34863e5b04535bb44cc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||
Date: Wed, 8 Dec 2021 10:22:37 +0100
|
||||
Subject: [PATCH] Remove optional or unpackaged test deps
|
||||
From bc29357f2effabd91c47562d332f0ae731ffcee0 Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Mon, 21 Feb 2022 09:22:42 +0100
|
||||
Subject: [PATCH] Update
|
||||
|
||||
---
|
||||
setup.cfg | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
setup.cfg | 14 --------------
|
||||
1 file changed, 14 deletions(-)
|
||||
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
index 0bc0101..442da7a 100644
|
||||
index 4a4a9a2..ce587f6 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -37,21 +37,11 @@ exclude =
|
||||
@@ -38,19 +38,8 @@ exclude =
|
||||
[options.extras_require]
|
||||
testing =
|
||||
pytest >= 6
|
||||
@ -19,20 +19,28 @@ index 0bc0101..442da7a 100644
|
||||
- pytest-flake8
|
||||
- pytest-black >= 0.3.7; \
|
||||
- python_implementation != "PyPy"
|
||||
- pytest-cov
|
||||
- pytest-mypy; \
|
||||
- pytest-cov; \
|
||||
- python_implementation != "PyPy"
|
||||
- pytest-mypy >= 0.9.1; \
|
||||
- python_implementation != "PyPy"
|
||||
- pytest-enabler >= 1.0.1
|
||||
- pytest-perf
|
||||
|
||||
mock
|
||||
- flake8-2020
|
||||
virtualenv>=13.0.0
|
||||
pytest-virtualenv>=1.2.7 # TODO: Update once man-group/pytest-plugins#188 is solved
|
||||
wheel
|
||||
- paver
|
||||
pip>=19.1 # For proper file:// URLs support.
|
||||
jaraco.envs>=2.2
|
||||
@@ -58,9 +47,6 @@ testing =
|
||||
pytest-xdist
|
||||
sphinx>=4.3.2
|
||||
jaraco.path>=3.2.0
|
||||
- build[virtualenv]
|
||||
- filelock>=3.4.0
|
||||
- pip_run>=8.8
|
||||
testing-integration =
|
||||
pytest
|
||||
pytest-xdist
|
||||
--
|
||||
2.33.1
|
||||
2.35.1
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
Name: python-setuptools
|
||||
# When updating, update the bundled libraries versions bellow!
|
||||
Version: 59.6.0
|
||||
Release: 2%{?dist}
|
||||
Version: 60.9.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Easily build and distribute Python packages
|
||||
# setuptools is MIT
|
||||
# appdirs is MIT
|
||||
@ -33,14 +33,27 @@ Summary: Easily build and distribute Python packages
|
||||
# ordered-set is MIT
|
||||
# packaging is BSD or ASL 2.0
|
||||
# pyparsing is MIT
|
||||
# importlib-metadata is ASL 2.0
|
||||
# importlib-resources is ASL 2.0
|
||||
# jaraco.text is MIT
|
||||
# typing-extensions is Python
|
||||
# zipp is MIT
|
||||
# the setuptools logo is MIT
|
||||
License: MIT and (BSD or ASL 2.0)
|
||||
License: MIT and ASL 2.0 and (BSD or ASL 2.0) and Python
|
||||
URL: https://pypi.python.org/pypi/%{srcname}
|
||||
Source0: %{pypi_source %{srcname} %{version}}
|
||||
|
||||
# Some test deps are optional and either not desired or not available in Fedora, thus this patch removes them.
|
||||
# For future reference, these packages were removed: pytest-(checkdocs|black|cov|mypy|enabler), flake8-2020, paver
|
||||
Patch: Remove-optional-or-unpackaged-test-deps.patch
|
||||
# Increase test isolation by unsetting PYTHONPATH in spawned processes -
|
||||
# with this patch tests run correctly in our special build environment
|
||||
# This patch was merged upstream:
|
||||
# https://github.com/pypa/setuptools/pull/3133
|
||||
Patch: Isolate-spawned-processes-by-unsetting-PYTHONPATH.patch
|
||||
# Run the tests using the wheel we've just built, there's no need to build
|
||||
# a new one just for the tests (and it requires internet connection)
|
||||
# PR open upstream: https://github.com/pypa/setuptools/pull/3156
|
||||
Patch: Point-to-a-custom-pre-built-distribution-of-setuptools.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -76,10 +89,15 @@ execute the software that requires pkg_resources.
|
||||
# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{python3_pkgversion}dist' allvendor.txt
|
||||
%global bundled %{expand:
|
||||
Provides: bundled(python%{python3_pkgversion}dist(appdirs)) = 1.4.3
|
||||
Provides: bundled(python%{python3_pkgversion}dist(importlib-metadata)) = 4.11.1
|
||||
Provides: bundled(python%{python3_pkgversion}dist(importlib-resources)) = 5.4
|
||||
Provides: bundled(python%{python3_pkgversion}dist(jaraco-text)) = 3.7
|
||||
Provides: bundled(python%{python3_pkgversion}dist(more-itertools)) = 8.8
|
||||
Provides: bundled(python%{python3_pkgversion}dist(ordered-set)) = 3.1.1
|
||||
Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 21.2
|
||||
Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 21.3
|
||||
Provides: bundled(python%{python3_pkgversion}dist(pyparsing)) = 2.2.1
|
||||
Provides: bundled(python%{python3_pkgversion}dist(typing-extensions)) = 4.0.1
|
||||
Provides: bundled(python%{python3_pkgversion}dist(zipp)) = 3.7
|
||||
}
|
||||
|
||||
%package -n python%{python3_pkgversion}-setuptools
|
||||
@ -167,9 +185,9 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w
|
||||
cat pkg_resources/_vendor/vendored.txt setuptools/_vendor/vendored.txt > allvendor.txt
|
||||
%{_rpmconfigdir}/pythonbundles.py allvendor.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}'
|
||||
|
||||
# Regression test, the wheel should not be larger than 600 KiB
|
||||
# Regression test, the wheel should not be larger than 800 KiB
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1914481#c3
|
||||
test $(du %{_pyproject_wheeldir}/%{python_wheel_name} | cut -f1) -lt 600
|
||||
test $(du %{_pyproject_wheeldir}/%{python_wheel_name} | cut -f1) -lt 800
|
||||
|
||||
# Regression test, the tests are not supposed to be installed
|
||||
test ! -d %{buildroot}%{python3_sitelib}/pkg_resources/tests
|
||||
@ -180,10 +198,17 @@ rm pyproject.toml
|
||||
|
||||
# Upstream tests
|
||||
# --ignore=setuptools/tests/test_integration.py
|
||||
# --ignore=setuptools/tests/integration/
|
||||
# -k "not test_pip_upgrade_from_source"
|
||||
# the tests require internet connection
|
||||
# --ignore=pavement.py:
|
||||
# pavement.py is only used by upstream to do releases and vendoring, we don't ship it
|
||||
PYTHONPATH=$(pwd) %pytest --ignore=setuptools/tests/test_integration.py --ignore=pavement.py
|
||||
# --ignore=setuptools/tests/test_develop.py
|
||||
# the tests require pip-run which we don't have in Fedora
|
||||
PRE_BUILT_SETUPTOOLS_WHEEL=%{_pyproject_wheeldir}/%{python_wheel_name} \
|
||||
PYTHONPATH=$(pwd) %pytest \
|
||||
--ignore=setuptools/tests/test_integration.py \
|
||||
--ignore=setuptools/tests/integration/ \
|
||||
--ignore=setuptools/tests/test_develop.py \
|
||||
-k "not test_pip_upgrade_from_source"
|
||||
%endif # with tests
|
||||
|
||||
|
||||
@ -208,6 +233,10 @@ PYTHONPATH=$(pwd) %pytest --ignore=setuptools/tests/test_integration.py --ignore
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 16 2022 Karolina Surma <ksurma@redhat.com> - 60.9.3-1
|
||||
- Update to 60.9.3
|
||||
- Fixes rhbz#2033860
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 59.6.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (setuptools-59.6.0.tar.gz) = 25472ec7c167e07113c6645880952458969b146766b64224ec8f40dfc2a29b23e47104b63e806292ec81ee4e9dbbdc4663228f39b4412b586cba644f69b52309
|
||||
SHA512 (setuptools-60.9.3.tar.gz) = 37ace6412532a7cb86f3c63fa94c8d60b1616f3cbae12499d01b6d21cb6f48ffc50d28d1f68e046c775c313a23873a02b999fdc9b95ec762b89d9c5746a63a1d
|
||||
|
Loading…
Reference in New Issue
Block a user