diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-11-09 21:21:09 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-07 14:56:54 +0000 |
| commit | 990af746c250dcb1b7b46e0c887e2ccf67f67d26 (patch) | |
| tree | be448e2636be5044048d0c6f6f566a12e357a4ff /meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch | |
| parent | 3c499e21f4225fdaebbb22582753f736ce7e4a73 (diff) | |
| download | poky-990af746c250dcb1b7b46e0c887e2ccf67f67d26.tar.gz | |
python3: use the standard shell version of python3-config
There is really no reason why we can't: it only needs to be available
in two versions (native/target), and the correct one can be picked
via PATH priority order.
This eliminates two un-upstreamable patches, one of which relies
on soon to be removed distutils.
(From OE-Core rev: d0145ead0f80ba4bde8e24617a8725f38eda8339)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch')
| -rw-r--r-- | meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 921da8de7c..db08435004 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From f0c9dec63d452a7cd1e15ea653f4aced281f021c Mon Sep 17 00:00:00 2001 | 1 | From 78f482b91d94b44a02e02c4580166757119061ea Mon Sep 17 00:00:00 2001 |
| 2 | From: Paulo Neves <ptsneves@gmail.com> | 2 | From: Paulo Neves <ptsneves@gmail.com> |
| 3 | Date: Tue, 7 Jun 2022 16:16:41 +0200 | 3 | Date: Tue, 7 Jun 2022 16:16:41 +0200 |
| 4 | Subject: [PATCH 1/1] Avoid shebang overflow on python-config.py | 4 | Subject: [PATCH] Avoid shebang overflow on python-config.py |
| 5 | 5 | ||
| 6 | The whole native path may be too big, leading to shebang | 6 | The whole native path may be too big, leading to shebang |
| 7 | overflow. Let's just use the env shebang. | 7 | overflow. Let's just use the env shebang. |
| @@ -11,15 +11,16 @@ Denial reason: [1] | |||
| 11 | Upstream-Status: Denied [distribution] | 11 | Upstream-Status: Denied [distribution] |
| 12 | 12 | ||
| 13 | [1] https://github.com/python/cpython/pull/93760#pullrequestreview-1005365737 | 13 | [1] https://github.com/python/cpython/pull/93760#pullrequestreview-1005365737 |
| 14 | |||
| 14 | --- | 15 | --- |
| 15 | Makefile.pre.in | 2 ++ | 16 | Makefile.pre.in | 2 ++ |
| 16 | 1 file changed, 2 insertions(+) | 17 | 1 file changed, 2 insertions(+) |
| 17 | 18 | ||
| 18 | diff --git a/Makefile.pre.in b/Makefile.pre.in | 19 | diff --git a/Makefile.pre.in b/Makefile.pre.in |
| 19 | index f0aedb76cb58999427804255da56fa53284d7032..dd88e43114730f7681715777cc76dabb31113176 100644 | 20 | index 55c7c46..1f6500a 100644 |
| 20 | --- a/Makefile.pre.in | 21 | --- a/Makefile.pre.in |
| 21 | +++ b/Makefile.pre.in | 22 | +++ b/Makefile.pre.in |
| 22 | @@ -1638,6 +1638,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh | 23 | @@ -2115,6 +2115,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh |
| 23 | @ # Substitution happens here, as the completely-expanded BINDIR | 24 | @ # Substitution happens here, as the completely-expanded BINDIR |
| 24 | @ # is not available in configure | 25 | @ # is not available in configure |
| 25 | sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py | 26 | sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py |
| @@ -27,7 +28,4 @@ index f0aedb76cb58999427804255da56fa53284d7032..dd88e43114730f7681715777cc76dabb | |||
| 27 | + sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' python-config.py | 28 | + sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' python-config.py |
| 28 | @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} | 29 | @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} |
| 29 | LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config | 30 | LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config |
| 30 | @ # In OpenEmbedded, always use the python version of the script, the shell | 31 | @ # On Darwin, always use the python version of the script, the shell |
| 31 | -- | ||
| 32 | 2.25.1 | ||
| 33 | |||
