summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/python-config.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-11-09 21:21:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-07 14:56:54 +0000
commit990af746c250dcb1b7b46e0c887e2ccf67f67d26 (patch)
treebe448e2636be5044048d0c6f6f566a12e357a4ff /meta/recipes-devtools/python/python3/python-config.patch
parent3c499e21f4225fdaebbb22582753f736ce7e4a73 (diff)
downloadpoky-990af746c250dcb1b7b46e0c887e2ccf67f67d26.tar.gz
python3: use the standard shell version of python3-config
There is really no reason why we can't: it only needs to be available in two versions (native/target), and the correct one can be picked via PATH priority order. This eliminates two un-upstreamable patches, one of which relies on soon to be removed distutils. (From OE-Core rev: d0145ead0f80ba4bde8e24617a8725f38eda8339) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/python-config.patch')
-rw-r--r--meta/recipes-devtools/python/python3/python-config.patch55
1 files changed, 0 insertions, 55 deletions
diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch
deleted file mode 100644
index 4da399e46e..0000000000
--- a/meta/recipes-devtools/python/python3/python-config.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 8632f25ac4e2c53a3c2c8a1b4fc97fc86e8aad5a Mon Sep 17 00:00:00 2001
2From: Tyler Hall <tylerwhall@gmail.com>
3Date: Sun, 4 May 2014 20:06:43 -0400
4Subject: [PATCH] python-config: Revert to using distutils.sysconfig
5
6The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in
7
812-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig
9
10affect the native runtime as well as cross building. Use the old, patched
11implementation which returns paths in the staging directory and for the target,
12as appropriate.
13
14Upstream-Status: Inappropriate [Embedded Specific]
15
16Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
17
18---
19 Misc/python-config.in | 12 +++++++-----
20 1 file changed, 7 insertions(+), 5 deletions(-)
21
22diff --git a/Misc/python-config.in b/Misc/python-config.in
23index ebd99da..0492e08 100644
24--- a/Misc/python-config.in
25+++ b/Misc/python-config.in
26@@ -6,7 +6,9 @@
27 import getopt
28 import os
29 import sys
30-import sysconfig
31+import warnings
32+warnings.filterwarnings("ignore", category=DeprecationWarning)
33+from distutils import sysconfig
34
35 valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
36 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir',
37@@ -35,14 +37,14 @@ if '--help' in opt_flags:
38
39 for opt in opt_flags:
40 if opt == '--prefix':
41- print(getvar('prefix'))
42+ print(sysconfig.PREFIX)
43
44 elif opt == '--exec-prefix':
45- print(getvar('exec_prefix'))
46+ print(sysconfig.EXEC_PREFIX)
47
48 elif opt in ('--includes', '--cflags'):
49- flags = ['-I' + sysconfig.get_path('include'),
50- '-I' + sysconfig.get_path('platinclude')]
51+ flags = ['-I' + sysconfig.get_python_inc(),
52+ '-I' + sysconfig.get_python_inc(plat_specific=True)]
53 if opt == '--cflags':
54 flags.extend(getvar('CFLAGS').split())
55 print(' '.join(flags))