diff --git a/Revert-Always-rewrite-a-Python-shebang-to-python.patch b/Revert-Always-rewrite-a-Python-shebang-to-python.patch new file mode 100644 index 0000000000000000000000000000000000000000..608098d8d22194dd71e66457d5976b0ee601aef1 --- /dev/null +++ b/Revert-Always-rewrite-a-Python-shebang-to-python.patch @@ -0,0 +1,45 @@ +From 06a246f1fbd79d70951488d65d5fe6bfa4afd4ef Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Thu, 13 Mar 2025 11:52:42 +0100 +Subject: [PATCH] Revert "Always rewrite a Python shebang to #!python." + +This reverts commit c71266345c64fd662b5f95bbbc6e4536172f496d. +--- + setuptools/_distutils/command/build_scripts.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/setuptools/_distutils/command/build_scripts.py b/setuptools/_distutils/command/build_scripts.py +index 127c51d8d..05ba2c93c 100644 +--- a/setuptools/_distutils/command/build_scripts.py ++++ b/setuptools/_distutils/command/build_scripts.py +@@ -5,6 +5,7 @@ Implements the Distutils 'build_scripts' command.""" + import os + import re + import tokenize ++from distutils import sysconfig + from distutils._log import log + from stat import ST_MODE + from typing import ClassVar +@@ -105,8 +106,18 @@ class build_scripts(Command): + if shebang_match: + log.info("copying and adjusting %s -> %s", script, self.build_dir) + if not self.dry_run: ++ if not sysconfig.python_build: ++ executable = self.executable ++ else: ++ executable = os.path.join( ++ sysconfig.get_config_var("BINDIR"), ++ "python{}{}".format( ++ sysconfig.get_config_var("VERSION"), ++ sysconfig.get_config_var("EXE"), ++ ), ++ ) + post_interp = shebang_match.group(1) or '' +- shebang = f"#!python{post_interp}\n" ++ shebang = "#!" + executable + post_interp + "\n" + self._validate_shebang(shebang, f.encoding) + with open(outfile, "w", encoding=f.encoding) as outf: + outf.write(shebang) +-- +2.48.1 + diff --git a/python-setuptools.spec b/python-setuptools.spec index 3585417dfaf1fad6aa208941c56254ecf367a7a3..a56df504c9b17a1c69c786346a576aa1b04264eb 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -7,14 +7,14 @@ %global python_whlname setuptools-%{version}-py3-none-any.whl Name: python-setuptools -Version: 69.1.0 -Release: 1 +Version: 78.1.1 +Release: 4 Summary: Easily build and distribute Python packages -License: MIT and (BSD or ASL 2.0) +License: MIT AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0) AND Python-2.0 AND LGPL-3.0-only URL: https://pypi.python.org/pypi/setuptools Source0: %{pypi_source setuptools %{version}} - +Patch1: Revert-Always-rewrite-a-Python-shebang-to-python.patch BuildArch: noarch @@ -29,7 +29,6 @@ BuildRequires: python3-pip, python3-wheel %endif Provides: python-distribute = %{version}-%{release}, %{name}-wheel -Obsoletes: python-distribute < 0.6.36-2, %{name}-wheel %description Setuptools is a collection of enhancements to the Python distutils that allow @@ -43,6 +42,7 @@ Summary: Easily build and distribute Python 3 packages Conflicts: python-setuptools < %{version}-%{release} Provides: python%{python3_pkgversion}dist(setuptools) = %{version} Provides: python%{python3_version}dist(setuptools) = %{version} +Requires: (gobject-introspection-devel >= 1.81.2 if gobject-introspection-devel) %description -n python3-setuptools Setuptools is a collection of enhancements to the Python 3 distutils that allow @@ -59,8 +59,6 @@ execute the software that requires pkg_resources.py. find setuptools pkg_resources -name \*.py | xargs sed -i -e '1 {/^#!\//d}' rm -f setuptools/*.exe -rm setuptools/tests/test_integration.py -chmod -x README.rst %build %if %{without bootstrap} @@ -110,6 +108,30 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %changelog +* Thu Aug 28 2025 fuanan - 78.1.1-4 +- update License + +* Thu Jul 03 2025 Dongxing Wang - 78.1.1-3 +- Revert Always rewrite a Python shebang to python + +* Tue Jun 10 2025 Funda Wang - 78.1.1-2 +- force gobject-introspection version for upgrade + +* Thu May 29 2025 Dongxing Wang - 78.1.1-1 +- Update package to version 78.1.1 + +* Wed May 28 2025 Dongxing Wang - 69.5.0-1 +- Update package to version 69.5.0 + +* Mon Aug 26 2024 dillon chen - 69.2.0-1 +- back package to version 69.2.0 + +* Mon Jul 15 2024 zhangxianting - 68.0.0-2 +- Fix CVE-2024-6345 + +* Sun Apr 7 2024 chenhuihan - 68.0.0-1 +- back package to version 68.0.0 + * Thu Feb 22 2024 liweigang - 69.1.0-1 - update package to version 69.1.0 diff --git a/setuptools-69.1.0.tar.gz b/setuptools-69.1.0.tar.gz deleted file mode 100644 index a671741111f645530236f1d339023a3398b576bd..0000000000000000000000000000000000000000 Binary files a/setuptools-69.1.0.tar.gz and /dev/null differ diff --git a/setuptools-78.1.1.tar.gz b/setuptools-78.1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a6becac7c518245774a9026d9641ddd7f26b8f84 Binary files /dev/null and b/setuptools-78.1.1.tar.gz differ