From: Alexander Kanavin Date: Wed, 28 Dec 2022 07:36:59 +0000 (+0100) Subject: python3-installer: update 0.5.1 -> 0.6.0 X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2200 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b64d25d3e0e8f0b6a7e4b985d305519be4879073;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git python3-installer: update 0.5.1 -> 0.6.0 Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/python/python3-installer/interpreter.patch b/meta/recipes-devtools/python/python3-installer/interpreter.patch index ef10ef1b45f..7906769b901 100644 --- a/meta/recipes-devtools/python/python3-installer/interpreter.patch +++ b/meta/recipes-devtools/python/python3-installer/interpreter.patch @@ -1,3 +1,8 @@ +From 74fe171fa4a25c120607e9f8450cbdfee675c959 Mon Sep 17 00:00:00 2001 +From: Ross Burton +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 +--- + 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): diff --git a/meta/recipes-devtools/python/python3-installer_0.5.1.bb b/meta/recipes-devtools/python/python3-installer_0.6.0.bb similarity index 89% rename from meta/recipes-devtools/python/python3-installer_0.5.1.bb rename to meta/recipes-devtools/python/python3-installer_0.6.0.bb index 07bbafa81fb..e728e47cecb 100644 --- a/meta/recipes-devtools/python/python3-installer_0.5.1.bb +++ b/meta/recipes-devtools/python/python3-installer_0.6.0.bb @@ -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