diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-pip')
-rw-r--r-- | meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch | 60 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch | 36 |
2 files changed, 36 insertions, 60 deletions
diff --git a/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch b/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch deleted file mode 100644 index 00cffe169b..0000000000 --- a/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From e7a00e9b5104ae2fbcea32a35c85760b77fae7e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 23 Apr 2020 09:42:10 +0000 | ||
4 | Subject: [PATCH] change shebang to python3 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | pip will drop support of python2 from 21.0 | ||
9 | |||
10 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
11 | --- | ||
12 | src/pip/_internal/__init__.py | 2 +- | ||
13 | src/pip/_vendor/appdirs.py | 2 +- | ||
14 | src/pip/_vendor/chardet/cli/chardetect.py | 2 +- | ||
15 | src/pip/_vendor/requests/certs.py | 2 +- | ||
16 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py | ||
19 | index 3aa8a46..e1ad179 100755 | ||
20 | --- a/src/pip/_internal/__init__.py | ||
21 | +++ b/src/pip/_internal/__init__.py | ||
22 | @@ -1,4 +1,4 @@ | ||
23 | -#!/usr/bin/env python | ||
24 | +#!/usr/bin/env python3 | ||
25 | import pip._internal.utils.inject_securetransport # noqa | ||
26 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING | ||
27 | |||
28 | diff --git a/src/pip/_vendor/appdirs.py b/src/pip/_vendor/appdirs.py | ||
29 | index 3a52b75..ad3f81d 100644 | ||
30 | --- a/src/pip/_vendor/appdirs.py | ||
31 | +++ b/src/pip/_vendor/appdirs.py | ||
32 | @@ -1,4 +1,4 @@ | ||
33 | -#!/usr/bin/env python | ||
34 | +#!/usr/bin/env python3 | ||
35 | # -*- coding: utf-8 -*- | ||
36 | # Copyright (c) 2005-2010 ActiveState Software Inc. | ||
37 | # Copyright (c) 2013 Eddy Petrișor | ||
38 | diff --git a/src/pip/_vendor/chardet/cli/chardetect.py b/src/pip/_vendor/chardet/cli/chardetect.py | ||
39 | index c61136b..a497e98 100644 | ||
40 | --- a/src/pip/_vendor/chardet/cli/chardetect.py | ||
41 | +++ b/src/pip/_vendor/chardet/cli/chardetect.py | ||
42 | @@ -1,4 +1,4 @@ | ||
43 | -#!/usr/bin/env python | ||
44 | +#!/usr/bin/env python3 | ||
45 | """ | ||
46 | Script which takes one or more file paths and reports on their detected | ||
47 | encodings | ||
48 | diff --git a/src/pip/_vendor/requests/certs.py b/src/pip/_vendor/requests/certs.py | ||
49 | index 06a594e..bfa7839 100644 | ||
50 | --- a/src/pip/_vendor/requests/certs.py | ||
51 | +++ b/src/pip/_vendor/requests/certs.py | ||
52 | @@ -1,4 +1,4 @@ | ||
53 | -#!/usr/bin/env python | ||
54 | +#!/usr/bin/env python3 | ||
55 | # -*- coding: utf-8 -*- | ||
56 | |||
57 | """ | ||
58 | -- | ||
59 | 2.24.1 | ||
60 | |||
diff --git a/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch b/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch new file mode 100644 index 0000000000..99fa14ee03 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pip/no_shebang_mangling.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 2aa82aeb0783c5fa7777b32bfe1dd3da9ae8fc6e Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Wed, 23 Feb 2022 12:27:06 +0000 | ||
4 | Subject: [PATCH] python3-pip: Don't change shebang | ||
5 | |||
6 | Patch pip to disable shebang mangling and also force the python executable | ||
7 | to be python3 from the environment when building anything for the target | ||
8 | (or nativesdk). This avoids incorrect interpreter paths in the target scripts. | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE specific config] | ||
11 | --- | ||
12 | src/pip/_vendor/distlib/scripts.py | 4 +++- | ||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/pip/_vendor/distlib/scripts.py b/src/pip/_vendor/distlib/scripts.py | ||
16 | index cfa45d2..313f499 100644 | ||
17 | --- a/src/pip/_vendor/distlib/scripts.py | ||
18 | +++ b/src/pip/_vendor/distlib/scripts.py | ||
19 | @@ -144,6 +144,8 @@ class ScriptMaker(object): | ||
20 | See also: http://www.in-ulm.de/~mascheck/various/shebang/#length | ||
21 | https://hg.mozilla.org/mozilla-central/file/tip/mach | ||
22 | """ | ||
23 | + if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ: | ||
24 | + return b'#!/usr/bin/env python3' | ||
25 | if os.name != 'posix': | ||
26 | simple_shebang = True | ||
27 | else: | ||
28 | @@ -362,7 +364,7 @@ class ScriptMaker(object): | ||
29 | return | ||
30 | |||
31 | match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n')) | ||
32 | - if match: | ||
33 | + if False: | ||
34 | adjust = True | ||
35 | post_interp = match.group(1) or b'' | ||
36 | |||