poky/meta/recipes-devtools/python/python3/python-config.patch
Alexander Kanavin 28c5a5033e python3: update to 3.8.1
Drop backports, rebase other patches.

0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
is removed as the use case (allowing python 2 and 3 to coexist
in SDKs) is no longer relevant with Python 2.x reaching end of line
and upstream has refactored the code making a rebase difficult.
If needed, please re-add the patch to py2, rather than py3.

Python 3.8 no longer adds "m" to "3.8" in paths, so adjust the recipes
and classes accordingly.

The manifest for the 3.8.0 version is updated; particularly pkgutil
module is now packaged in -core (as other things in core need it);
this also necessitates allowing empty -pkgutil package to avoid
breakage across layers.

(From OE-Core rev: e6ab9f16b92aa1abdae82c535c1a452a1341b0e2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21 12:52:52 +00:00

55 lines
1.8 KiB
Diff

From 07df0ae0d70cba6d1847fe1c24a71063930bec60 Mon Sep 17 00:00:00 2001
From: Tyler Hall <tylerwhall@gmail.com>
Date: Sun, 4 May 2014 20:06:43 -0400
Subject: [PATCH] python-config: Revert to using distutils.sysconfig
The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in
12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig
affect the native runtime as well as cross building. Use the old, patched
implementation which returns paths in the staging directory and for the target,
as appropriate.
Upstream-Status: Inappropriate [Embedded Specific]
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
:
---
Misc/python-config.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Misc/python-config.in b/Misc/python-config.in
index 727c4a8..c702829 100644
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -6,7 +6,7 @@
import getopt
import os
import sys
-import sysconfig
+from distutils import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir',
@@ -35,14 +35,14 @@ if '--help' in opt_flags:
for opt in opt_flags:
if opt == '--prefix':
- print(sysconfig.get_config_var('prefix'))
+ print(sysconfig.PREFIX)
elif opt == '--exec-prefix':
- print(sysconfig.get_config_var('exec_prefix'))
+ print(sysconfig.EXEC_PREFIX)
elif opt in ('--includes', '--cflags'):
- flags = ['-I' + sysconfig.get_path('include'),
- '-I' + sysconfig.get_path('platinclude')]
+ flags = ['-I' + sysconfig.get_python_inc(),
+ '-I' + sysconfig.get_python_inc(plat_specific=True)]
if opt == '--cflags':
flags.extend(getvar('CFLAGS').split())
print(' '.join(flags))