diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-devtools/python/python3-installer | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-installer')
| -rw-r--r-- | meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch | 27 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3-installer/interpreter.patch | 71 |
2 files changed, 0 insertions, 98 deletions
diff --git a/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch b/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch deleted file mode 100644 index a6715ed457..0000000000 --- a/meta/recipes-devtools/python/python3-installer/0001-src-installer-utils.py-sort-entries-before-writing-o.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From 760ddf50ce559abd67bbdd31797267d00bcddfb3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex@linutronix.de> | ||
| 3 | Date: Tue, 1 Oct 2024 19:22:11 +0200 | ||
| 4 | Subject: [PATCH] src/installer/utils.py: sort entries before writing out | ||
| 5 | RECORD file | ||
| 6 | |||
| 7 | This helps build reproducibility. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/pypa/installer/pull/245] | ||
| 10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 11 | --- | ||
| 12 | src/installer/utils.py | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/src/installer/utils.py b/src/installer/utils.py | ||
| 16 | index 3e601d6..073297c 100644 | ||
| 17 | --- a/src/installer/utils.py | ||
| 18 | +++ b/src/installer/utils.py | ||
| 19 | @@ -207,7 +207,7 @@ def construct_record_file( | ||
| 20 | io.BytesIO(), encoding="utf-8", write_through=True, newline="" | ||
| 21 | ) | ||
| 22 | writer = csv.writer(stream, delimiter=",", quotechar='"', lineterminator="\n") | ||
| 23 | - for scheme, record in records: | ||
| 24 | + for scheme, record in sorted(records, key=lambda x: x[1].path): | ||
| 25 | writer.writerow(record.to_row(prefix_for_scheme(scheme))) | ||
| 26 | stream.seek(0) | ||
| 27 | return stream.detach() | ||
diff --git a/meta/recipes-devtools/python/python3-installer/interpreter.patch b/meta/recipes-devtools/python/python3-installer/interpreter.patch deleted file mode 100644 index 7906769b90..0000000000 --- a/meta/recipes-devtools/python/python3-installer/interpreter.patch +++ /dev/null | |||
| @@ -1,71 +0,0 @@ | |||
| 1 | From 74fe171fa4a25c120607e9f8450cbdfee675c959 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ross Burton <ross.burton@arm.com> | ||
| 3 | Date: Mon, 14 Mar 2022 14:39:22 +0000 | ||
| 4 | Subject: [PATCH] python3-installer: add installer module | ||
| 5 | |||
| 6 | Let us override the hashbang directly (possibly upstreamable), and don't | ||
| 7 | play games with hashbangs: for now assume that even hashbangs with spaces | ||
| 8 | are simple (assume the spaces are only used to separate arguments) and | ||
| 9 | we don't have long hashbangs. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate | ||
| 12 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | src/installer/__main__.py | 9 ++++++++- | ||
| 16 | src/installer/scripts.py | 15 +-------------- | ||
| 17 | 2 files changed, 9 insertions(+), 15 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/src/installer/__main__.py b/src/installer/__main__.py | ||
| 20 | index 51014b9..38de286 100644 | ||
| 21 | --- a/src/installer/__main__.py | ||
| 22 | +++ b/src/installer/__main__.py | ||
| 23 | @@ -30,6 +30,13 @@ def _get_main_parser() -> argparse.ArgumentParser: | ||
| 24 | type=str, | ||
| 25 | help="override prefix to install packages to", | ||
| 26 | ) | ||
| 27 | + parser.add_argument( | ||
| 28 | + "--interpreter", | ||
| 29 | + "-i", | ||
| 30 | + type=str, | ||
| 31 | + default=sys.executable, | ||
| 32 | + help=f"interpreter (defaults to {sys.executable})", | ||
| 33 | + ) | ||
| 34 | parser.add_argument( | ||
| 35 | "--compile-bytecode", | ||
| 36 | action="append", | ||
| 37 | @@ -86,7 +93,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None: | ||
| 38 | with WheelFile.open(args.wheel) as source: | ||
| 39 | destination = SchemeDictionaryDestination( | ||
| 40 | scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix), | ||
| 41 | - interpreter=sys.executable, | ||
| 42 | + interpreter=args.interpreter, | ||
| 43 | script_kind=get_launcher_kind(), | ||
| 44 | bytecode_optimization_levels=bytecode_levels, | ||
| 45 | destdir=args.destdir, | ||
| 46 | diff --git a/src/installer/scripts.py b/src/installer/scripts.py | ||
| 47 | index 7e3c8fc..ba6ed5a 100644 | ||
| 48 | --- a/src/installer/scripts.py | ||
| 49 | +++ b/src/installer/scripts.py | ||
| 50 | @@ -59,20 +59,7 @@ def _build_shebang(executable: str, forlauncher: bool) -> bytes: | ||
| 51 | https://bitbucket.org/pypa/distlib/src/58cd5c6/distlib/scripts.py#lines-124 | ||
| 52 | """ | ||
| 53 | executable_bytes = executable.encode("utf-8") | ||
| 54 | - if forlauncher: # The launcher can just use the command as-is. | ||
| 55 | - return b"#!" + executable_bytes | ||
| 56 | - if _is_executable_simple(executable_bytes): | ||
| 57 | - return b"#!" + executable_bytes | ||
| 58 | - | ||
| 59 | - # Shebang support for an executable with a space in it is under-specified | ||
| 60 | - # and platform-dependent, so we use a clever hack to generate a script to | ||
| 61 | - # run in ``/bin/sh`` that should work on all reasonably modern platforms. | ||
| 62 | - # Read the following message to understand how the hack works: | ||
| 63 | - # https://github.com/pradyunsg/installer/pull/4#issuecomment-623668717 | ||
| 64 | - | ||
| 65 | - quoted = shlex.quote(executable).encode("utf-8") | ||
| 66 | - # I don't understand a lick what this is trying to do. | ||
| 67 | - return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''" | ||
| 68 | + return b"#!" + executable_bytes | ||
| 69 | |||
| 70 | |||
| 71 | class InvalidScript(ValueError): | ||
