diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-setuptools/0002-Remove-support-for-special-executable-under-a-Python.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3-setuptools/0002-Remove-support-for-special-executable-under-a-Python.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-setuptools/0002-Remove-support-for-special-executable-under-a-Python.patch b/meta/recipes-devtools/python/python3-setuptools/0002-Remove-support-for-special-executable-under-a-Python.patch new file mode 100644 index 0000000000..ea3fd22331 --- /dev/null +++ b/meta/recipes-devtools/python/python3-setuptools/0002-Remove-support-for-special-executable-under-a-Python.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 3b2944f3d9f83129500571f9e44fb0779bf0987b Mon Sep 17 00:00:00 2001 | ||
2 | From: "Jason R. Coombs" <jaraco@jaraco.com> | ||
3 | Date: Fri, 2 May 2025 20:07:13 -0400 | ||
4 | Subject: [PATCH] Remove support for special executable under a Python build. | ||
5 | |||
6 | As far as I can tell, no one has complained about loss of this functionality. | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | [https://github.com/pypa/setuptools/commit/575445c672d78fcce22df1e459b7baf0304a38b9] | ||
10 | |||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | ||
13 | setuptools/_distutils/command/build_scripts.py | 15 ++------------- | ||
14 | 1 file changed, 2 insertions(+), 13 deletions(-) | ||
15 | |||
16 | diff --git a/setuptools/_distutils/command/build_scripts.py b/setuptools/_distutils/command/build_scripts.py | ||
17 | index 3f7aae0..b86ee6e 100644 | ||
18 | --- a/setuptools/_distutils/command/build_scripts.py | ||
19 | +++ b/setuptools/_distutils/command/build_scripts.py | ||
20 | @@ -5,7 +5,6 @@ Implements the Distutils 'build_scripts' command.""" | ||
21 | import os | ||
22 | import re | ||
23 | import tokenize | ||
24 | -from distutils import sysconfig | ||
25 | from distutils._log import log | ||
26 | from stat import ST_MODE | ||
27 | from typing import ClassVar | ||
28 | @@ -76,7 +75,7 @@ class build_scripts(Command): | ||
29 | |||
30 | return outfiles, updated_files | ||
31 | |||
32 | - def _copy_script(self, script, outfiles, updated_files): # noqa: C901 | ||
33 | + def _copy_script(self, script, outfiles, updated_files): | ||
34 | shebang_match = None | ||
35 | script = convert_path(script) | ||
36 | outfile = os.path.join(self.build_dir, os.path.basename(script)) | ||
37 | @@ -106,18 +105,8 @@ class build_scripts(Command): | ||
38 | if shebang_match: | ||
39 | log.info("copying and adjusting %s -> %s", script, self.build_dir) | ||
40 | if not self.dry_run: | ||
41 | - if not sysconfig.python_build: | ||
42 | - executable = self.executable | ||
43 | - else: | ||
44 | - executable = os.path.join( | ||
45 | - sysconfig.get_config_var("BINDIR"), | ||
46 | - "python{}{}".format( | ||
47 | - sysconfig.get_config_var("VERSION"), | ||
48 | - sysconfig.get_config_var("EXE"), | ||
49 | - ), | ||
50 | - ) | ||
51 | post_interp = shebang_match.group(1) or '' | ||
52 | - shebang = "#!" + executable + post_interp + "\n" | ||
53 | + shebang = "#!" + self.executable + post_interp + "\n" | ||
54 | self._validate_shebang(shebang, f.encoding) | ||
55 | with open(outfile, "w", encoding=f.encoding) as outf: | ||
56 | outf.write(shebang) | ||
57 | -- | ||
58 | 2.34.1 | ||
59 | |||