diff --git a/62.3.2-skip-unsopported-test-cases.patch b/62.3.2-skip-unsopported-test-cases.patch deleted file mode 100644 index 0b130ea180e812dc94b909510406ecac0e09ba52..0000000000000000000000000000000000000000 --- a/62.3.2-skip-unsopported-test-cases.patch +++ /dev/null @@ -1,29 +0,0 @@ -when we build setuptools on TencentOS, we found that it lacks some dependencies in OS and build environment. -In koji, there is not network environment, so pip is disabled. And some python module is missing in TencentOS: -msvc cannot support linux, so we avoid test setuptools/tests/test_msvc.py -TencentOS lacks python3-build now, so we comment setuptools/tests/test_config_discovery.py and setuptools/tests/integration/* -setuptools/tests/test_develop.py has bug in TencentOS -TencentOS lacks python3-tomli-w now, so we comment setuptools/tests/config/test_apply_pyprojecttoml.py -TencentOS lacks some pytest plugins, so we comment setuptools/tests/test_config_discovery.py - -Thu May 26 2022 Zhao Zhen - 62.3.2-1 - ---- -diff --git a/pytest.ini b/pytest.ini -index 14c7e94c..8c5a3f8e 100644 ---- a/pytest.ini -+++ b/pytest.ini -@@ -4,6 +4,13 @@ addopts= - --doctest-modules - --doctest-glob=pkg_resources/api_tests.txt - -r sxX -+ --ignore=setuptools/tests/integration/* -+ --ignore=setuptools/tests/test_msvc.py -+ --ignore=setuptools/tests/config/test_pyprojecttoml.py -+ --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py -+ --ignore=setuptools/tests/test_develop.py -+ --ignore=setuptools/tests/test_config_discovery.py -+ --ignore=setuptools/tests/test_easy_install.py - doctest_optionflags=ALLOW_UNICODE ELLIPSIS - filterwarnings= - # Fail on warnings diff --git a/Adjust-the-setup.py-install-deprecation-message.patch b/Adjust-the-setup.py-install-deprecation-message.patch new file mode 100644 index 0000000000000000000000000000000000000000..62e5c56c669f1da6a49be8da468bd52951a15850 --- /dev/null +++ b/Adjust-the-setup.py-install-deprecation-message.patch @@ -0,0 +1,41 @@ +From 58f33f0aef5b137287e6f425b922a03123735a77 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Wed, 20 Sep 2023 17:18:47 +0200 +Subject: [PATCH] Adjust the setup.py install deprecation message and URL + +But only when building RPM packages. +--- + setuptools/command/install.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/setuptools/command/install.py b/setuptools/command/install.py +index 606cce9..0af1631 100644 +--- a/setuptools/command/install.py ++++ b/setuptools/command/install.py +@@ -1,6 +1,7 @@ + from distutils.errors import DistutilsArgError + import inspect + import glob ++import os + import platform + import distutils.command.install as orig + +@@ -40,8 +41,13 @@ class install(orig.install): + Please avoid running ``setup.py`` directly. + Instead, use pypa/build, pypa/installer or other + standards-based tools. +- """, +- see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html", ++ """ ++ + (""" ++ Follow the current Python packaging guidelines when building ++ Python RPM packages. ++ """ if "RPM_BUILD_ROOT" in os.environ else ""), ++ see_url=("https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html" + ++ ("\nand https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/" if "RPM_BUILD_ROOT" in os.environ else "")), + # TODO: Document how to bootstrap setuptools without install + # (e.g. by unziping the wheel file) + # and then add a due_date to this warning. +-- +2.41.0 + diff --git a/Remove-optional-or-unpackaged-test-deps.patch b/Remove-optional-or-unpackaged-test-deps.patch index 247a1936486635ea842be0dc77e474c0f7b7d8c3..dcdf919dd385538af995ca4d4e2b9ebee1d20228 100644 --- a/Remove-optional-or-unpackaged-test-deps.patch +++ b/Remove-optional-or-unpackaged-test-deps.patch @@ -1,23 +1,22 @@ -From 87a18ba242ac7f02d41b877ffc796dde42e6a93e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= -Date: Wed, 10 Aug 2022 16:08:41 +0200 +From 00c8906cf12b908934c6877c8079666091f48cfb Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 12 Jan 2024 15:49:00 +0800 Subject: [PATCH] Remove optional or unpackaged test deps +Signed-off-by: rpm-build --- - setup.cfg | 14 -------------- - 1 file changed, 14 deletions(-) + setup.cfg | 16 ---------------- + 1 file changed, 16 deletions(-) diff --git a/setup.cfg b/setup.cfg -index b4ee876..094f621 100644 +index c1d8a69..5aeb4ae 100644 --- a/setup.cfg +++ b/setup.cfg -@@ -39,19 +39,7 @@ exclude = +@@ -39,30 +39,15 @@ exclude = [options.extras_require] testing = pytest >= 6 - pytest-checkdocs >= 2.4 -- pytest-flake8 -- flake8 < 5 - pytest-black >= 0.3.7; \ - python_implementation != "PyPy" - pytest-cov; \ @@ -25,21 +24,33 @@ index b4ee876..094f621 100644 - pytest-mypy >= 0.9.1; \ - python_implementation != "PyPy" - pytest-enabler >= 1.3 -- pytest-perf - +- pytest-ruff; sys_platform != "cygwin" +- - flake8-2020 virtualenv>=13.0.0 wheel pip>=19.1 # For proper file:// URLs support. -@@ -59,8 +47,6 @@ testing = + jaraco.envs>=2.2 pytest-xdist jaraco.path>=3.2.0 - build[virtualenv] -- filelock>=3.4.0 +- build[virtualenv] + filelock>=3.4.0 - pip_run>=8.8 - ini2toml[lite]>=0.9 +- ini2toml[lite]>=0.9 tomli-w>=1.0.0 pytest-timeout +- pytest-perf + testing-integration = + pytest + pytest-xdist +@@ -72,7 +57,6 @@ testing-integration = + wheel + jaraco.path>=3.2.0 + jaraco.envs>=2.2 +- build[virtualenv] + filelock>=3.4.0 + docs = + sphinx >= 3.5 -- 2.37.3 diff --git a/python-setuptools.spec b/python-setuptools.spec index e6d4a0b283e4d7c0f1fd542947492cf3b1339155..85cc02e9fa4fe15cf5dbed07f2e9aecdd15596ae 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -2,19 +2,23 @@ %global python_wheel_name %{srcname}-%{version}-py3-none-any.whl %bcond_with bootstrap + +%if %{with bootstrap} %bcond_with tests +%else +%bcond_without tests +%endif Summary: Easily download, build, install, upgrade, and uninstall Python packages Name: python-setuptools -Version: 65.5.1 -Release: 2%{?dist} +Version: 68.0.0 +Release: 1%{?dist} License: MIT and (BSD or ASL 2.0) URL: https://github.com/pypa/setuptools Source0: %{pypi_source %{srcname} %{version}} -Patch3000: Remove-optional-or-unpackaged-test-deps.patch -# skip some test cases, please look at comments in patch file in detail -Patch5001: 62.3.2-skip-unsopported-test-cases.patch +Patch3001: Remove-optional-or-unpackaged-test-deps.patch +Patch3002: Adjust-the-setup.py-install-deprecation-message.patch BuildRequires: python%{python3_pkgversion}-devel @@ -39,14 +43,14 @@ execute the software that requires pkg_resources. # cat pkg_resources/_vendor/vendored.txt setuptools/_vendor/vendored.txt > allvendor.txt # %%{_rpmconfigdir}/pythonbundles.py allvendor.txt --namespace 'python3dist' %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(platformdirs)) = 2.6.2 +Provides: bundled(python%{python3_pkgversion}dist(importlib-metadata)) = 6 +Provides: bundled(python%{python3_pkgversion}dist(importlib-resources)) = 5.10.2 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.3 -Provides: bundled(python%{python3_pkgversion}dist(pyparsing)) = 3.0.9 +Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 23.1 +Provides: bundled(python%{python3_pkgversion}dist(typing-extensions)) = 4.4 Provides: bundled(python%{python3_pkgversion}dist(typing-extensions)) = 4.0.1 Provides: bundled(python%{python3_pkgversion}dist(zipp)) = 3.7 Provides: bundled(python%{python3_pkgversion}dist(tomli)) = 2.0.1 @@ -115,16 +119,18 @@ mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %endif - -%if %{with tests} %check -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}' +%{_rpmconfigdir}/pythonbundles.py */_vendor/vendored.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}' -test $(stat --format %%s %{_pyproject_wheeldir}/%{python_wheel_name}) -lt 900000 test ! -d %{buildroot}%{python3_sitelib}/pkg_resources/tests test ! -d %{buildroot}%{python3_sitelib}/setuptools/tests +%if %{without bootstrap} +# Regression test to keep wheel not be larger than 900 kB +test $(stat --format %%s %{_pyproject_wheeldir}/%{python_wheel_name}) -lt 900000 +%endif + +%if %{with tests} rm pyproject.toml PRE_BUILT_SETUPTOOLS_WHEEL=%{_pyproject_wheeldir}/%{python_wheel_name} \ @@ -133,8 +139,16 @@ PYTHONPATH=$(pwd) %pytest \ --ignore=setuptools/tests/integration/ \ --ignore=setuptools/tests/test_editable_install.py \ --ignore=setuptools/tests/config/test_apply_pyprojecttoml.py \ - -k "not test_pip_upgrade_from_source" -%endif # with tests + --ignore=tools/finalize.py \ + -k "not test_pip_upgrade_from_source and \ + not test_setup_requires_honors_fetch_params and \ + not test_build_with_pyproject_configi and \ + not test_project and \ + not test_setupcfg_metadata and \ + not test_build_with_pyproject_config and \ + not test_build_with_discovered_name and \ + not test_include_package_data" +%endif %files -n python%{python3_pkgversion}-setuptools %{?!with_bootstrap:-f %{pyproject_files}} %license LICENSE @@ -155,6 +169,9 @@ PYTHONPATH=$(pwd) %pytest \ %endif %changelog +* Wed Jan 10 2024 Upgrade Robot - 68.0.0-1 +- Upgrade to version 68.0.0 + * Tue Sep 19 2023 Shuo Wang - 65.5.1-2 - Rebuilt for python 3.11 diff --git a/sources b/sources index 609cf24fbc5dc7bc25c649b9bfd7383abffabbe4..b1808acdf964c187358cded5742bf312a7aa0e7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (setuptools-65.5.1.tar.gz) = e75eb7fdb0bc5ffdc76ed864cf753c2672d097a60f8747ac5cd40a49276d33df31fb619877234b4c22693b627d9978ecdd48a5c6c48aa0bbb856d48dec70fb0a +SHA512 (setuptools-68.0.0.tar.gz) = da6d535a0db6eaf477c8c2148efbc2100fd88a14f3adad44d20e22bf52bee3f00fe86547ea650fe653519bd6ff5f9ef033a55bb3a05fed041e88e78cdfb81d7e