diff options
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.patch | 59 |
1 files changed, 0 insertions, 59 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 deleted file mode 100644 index 2ff2ccc43d..0000000000 --- a/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Wed, 14 Nov 2012 14:31:24 +0000 | ||
4 | Subject: [PATCH] python: Resolve intermediate staging issues | ||
5 | |||
6 | When cross compiling python, we used to need to install the Makefile, pyconfig.h | ||
7 | and the python library to their final location before being able to compile the | ||
8 | rest of python. This change allows us to point python at its own source when | ||
9 | building, avoiding a variety of sysroot staging issues and simplifying the main | ||
10 | python recipe. | ||
11 | |||
12 | Upstream-Status: Inappropriate | ||
13 | RP 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 | |||
20 | diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py | ||
21 | index 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 | ||
34 | diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py | ||
35 | index 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 | -- | ||
58 | 2.17.1 | ||
59 | |||