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>
This commit is contained in:
Alexander Kanavin 2022-12-28 08:36:59 +01:00 committed by Richard Purdie
parent 25e2d493aa
commit e20cf21490
2 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,8 @@
From 74fe171fa4a25c120607e9f8450cbdfee675c959 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Mon, 14 Mar 2022 14:39:22 +0000
Subject: [PATCH] python3-installer: add installer module
Let us override the hashbang directly (possibly upstreamable), and don't
play games with hashbangs: for now assume that even hashbangs with spaces
are simple (assume the spaces are only used to separate arguments) and
@ -6,13 +11,18 @@ we don't have long hashbangs.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
src/installer/__main__.py | 9 ++++++++-
src/installer/scripts.py | 15 +--------------
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/installer/__main__.py b/src/installer/__main__.py
index 3357ec5..d2fd8d2 100644
index 51014b9..38de286 100644
--- a/src/installer/__main__.py
+++ b/src/installer/__main__.py
@@ -23,6 +23,13 @@ def _get_main_parser() -> argparse.ArgumentParser:
@@ -30,6 +30,13 @@ def _get_main_parser() -> argparse.ArgumentParser:
type=str,
help="destination directory (prefix to prepend to each file)",
help="override prefix to install packages to",
)
+ parser.add_argument(
+ "--interpreter",
@ -24,10 +34,10 @@ index 3357ec5..d2fd8d2 100644
parser.add_argument(
"--compile-bytecode",
action="append",
@@ -73,7 +80,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
@@ -86,7 +93,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
with WheelFile.open(args.wheel) as source:
destination = SchemeDictionaryDestination(
scheme_dict=_get_scheme_dict(source.distribution),
scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix),
- interpreter=sys.executable,
+ interpreter=args.interpreter,
script_kind=get_launcher_kind(),
@ -56,6 +66,6 @@ index 7e3c8fc..ba6ed5a 100644
- # I don't understand a lick what this is trying to do.
- return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''"
+ return b"#!" + executable_bytes
class InvalidScript(ValueError):

View File

@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5038641aec7a77451e31da828ebfae00"
SRC_URI += "file://interpreter.patch"
SRC_URI[sha256sum] = "f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
SRC_URI[sha256sum] = "f3bd36cd261b440a88a1190b1becca0578fee90b4b62decc796932fdd5ae8839"
inherit pypi python_flit_core