summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-installer/interpreter.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-12-28 08:36:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-28 23:59:55 +0000
commite20cf2149078ecf15ebe1402bf89b15c0c53a04b (patch)
treee970b0cc3c1687a3444e7c88fc36773a74a49d88 /meta/recipes-devtools/python/python3-installer/interpreter.patch
parent25e2d493aa2617b056d6fb81e4a243f96386a0c2 (diff)
downloadpoky-e20cf2149078ecf15ebe1402bf89b15c0c53a04b.tar.gz
python3-installer: update 0.5.1 -> 0.6.0
(From OE-Core rev: b64d25d3e0e8f0b6a7e4b985d305519be4879073) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-installer/interpreter.patch')
-rw-r--r--meta/recipes-devtools/python/python3-installer/interpreter.patch24
1 files changed, 17 insertions, 7 deletions
diff --git a/meta/recipes-devtools/python/python3-installer/interpreter.patch b/meta/recipes-devtools/python/python3-installer/interpreter.patch
index ef10ef1b45..7906769b90 100644
--- a/meta/recipes-devtools/python/python3-installer/interpreter.patch
+++ b/meta/recipes-devtools/python/python3-installer/interpreter.patch
@@ -1,3 +1,8 @@
1From 74fe171fa4a25c120607e9f8450cbdfee675c959 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Mon, 14 Mar 2022 14:39:22 +0000
4Subject: [PATCH] python3-installer: add installer module
5
1Let us override the hashbang directly (possibly upstreamable), and don't 6Let us override the hashbang directly (possibly upstreamable), and don't
2play games with hashbangs: for now assume that even hashbangs with spaces 7play games with hashbangs: for now assume that even hashbangs with spaces
3are simple (assume the spaces are only used to separate arguments) and 8are simple (assume the spaces are only used to separate arguments) and
@@ -6,13 +11,18 @@ we don't have long hashbangs.
6Upstream-Status: Inappropriate 11Upstream-Status: Inappropriate
7Signed-off-by: Ross Burton <ross.burton@arm.com> 12Signed-off-by: Ross Burton <ross.burton@arm.com>
8 13
14---
15 src/installer/__main__.py | 9 ++++++++-
16 src/installer/scripts.py | 15 +--------------
17 2 files changed, 9 insertions(+), 15 deletions(-)
18
9diff --git a/src/installer/__main__.py b/src/installer/__main__.py 19diff --git a/src/installer/__main__.py b/src/installer/__main__.py
10index 3357ec5..d2fd8d2 100644 20index 51014b9..38de286 100644
11--- a/src/installer/__main__.py 21--- a/src/installer/__main__.py
12+++ b/src/installer/__main__.py 22+++ b/src/installer/__main__.py
13@@ -23,6 +23,13 @@ def _get_main_parser() -> argparse.ArgumentParser: 23@@ -30,6 +30,13 @@ def _get_main_parser() -> argparse.ArgumentParser:
14 type=str, 24 type=str,
15 help="destination directory (prefix to prepend to each file)", 25 help="override prefix to install packages to",
16 ) 26 )
17+ parser.add_argument( 27+ parser.add_argument(
18+ "--interpreter", 28+ "--interpreter",
@@ -24,10 +34,10 @@ index 3357ec5..d2fd8d2 100644
24 parser.add_argument( 34 parser.add_argument(
25 "--compile-bytecode", 35 "--compile-bytecode",
26 action="append", 36 action="append",
27@@ -73,7 +80,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None: 37@@ -86,7 +93,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
28 with WheelFile.open(args.wheel) as source: 38 with WheelFile.open(args.wheel) as source:
29 destination = SchemeDictionaryDestination( 39 destination = SchemeDictionaryDestination(
30 scheme_dict=_get_scheme_dict(source.distribution), 40 scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix),
31- interpreter=sys.executable, 41- interpreter=sys.executable,
32+ interpreter=args.interpreter, 42+ interpreter=args.interpreter,
33 script_kind=get_launcher_kind(), 43 script_kind=get_launcher_kind(),
@@ -56,6 +66,6 @@ index 7e3c8fc..ba6ed5a 100644
56- # I don't understand a lick what this is trying to do. 66- # I don't understand a lick what this is trying to do.
57- return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''" 67- return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''"
58+ return b"#!" + executable_bytes 68+ return b"#!" + executable_bytes
59 69
60 70
61 class InvalidScript(ValueError): 71 class InvalidScript(ValueError):