summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-11-18 15:28:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-16 22:38:52 +0000
commitcc7bd259519ea11b279486648a45c79e1aba35d3 (patch)
tree8d15bb332d2de43fa480d27da937af14317e285e /meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
parentc8342197f862d71c74311a9c6c5d38fa05fef5ad (diff)
downloadpoky-cc7bd259519ea11b279486648a45c79e1aba35d3.tar.gz
python: update to 2.7.17
Drop backports, rebase a couple of patches. This is the second last release of py 2.x; upstream support ends on 1 January 2020, there will be one final 2.x afterwards. Note that the only thing that still needs python 2.x in oe-core is u-boot; when the next u-boot update arrives, we should find out where the py3 migration is for that component before merging the update. (From OE-Core rev: 184b60eb905bb75ecc7a0c29a175e624d8555fac) (From OE-Core rev: 7009d823a0799ce7132bd77329b273a476718c8c) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> [Minor fixup for warrior context] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch')
-rw-r--r--meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch b/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
new file mode 100644
index 0000000000..2ff2ccc43d
--- /dev/null
+++ b/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
@@ -0,0 +1,59 @@
1From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 14 Nov 2012 14:31:24 +0000
4Subject: [PATCH] python: Resolve intermediate staging issues
5
6When cross compiling python, we used to need to install the Makefile, pyconfig.h
7and the python library to their final location before being able to compile the
8rest of python. This change allows us to point python at its own source when
9building, avoiding a variety of sysroot staging issues and simplifying the main
10python recipe.
11
12Upstream-Status: Inappropriate
13RP 2012/11/13
14
15---
16 Lib/distutils/sysconfig.py | 3 +++
17 Lib/sysconfig.py | 5 ++++-
18 2 files changed, 7 insertions(+), 1 deletion(-)
19
20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
21index 2f4b8ca..15bceb5 100644
22--- a/Lib/distutils/sysconfig.py
23+++ b/Lib/distutils/sysconfig.py
24@@ -31,6 +31,9 @@ else:
25 # sys.executable can be empty if argv[0] has been changed and Python is
26 # unable to retrieve the real program name
27 project_base = os.getcwd()
28+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
29+if _PYTHONBUILDDIR:
30+ project_base = _PYTHONBUILDDIR
31 if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
32 project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
33 # PC/VS7.1
34diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
35index 9c8350d..bddbe2e 100644
36--- a/Lib/sysconfig.py
37+++ b/Lib/sysconfig.py
38@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix)
39 _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
40 _CONFIG_VARS = None
41 _USER_BASE = None
42+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
43
44 def _safe_realpath(path):
45 try:
46@@ -100,7 +101,9 @@ def _safe_realpath(path):
47 except OSError:
48 return path
49
50-if sys.executable:
51+if _PYTHONBUILDDIR:
52+ _PROJECT_BASE = _PYTHONBUILDDIR
53+elif sys.executable:
54 _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
55 else:
56 # sys.executable can be empty if argv[0] has been changed and Python is
57--
582.17.1
59