mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
The use case is building a gpl3-free image, without having to rely on outdated recipes from meta-gplv2 layer. (From OE-Core rev: 02eb487c8145e0f3d957c39cf16f6f805e95e536) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From 5ce3ac59531828ff682646fbba59b2126b28a8aa Mon Sep 17 00:00:00 2001
|
|
From: Jaewon Lee <jaewon.lee@xilinx.com>
|
|
Date: Thu, 25 Apr 2019 15:34:26 -0700
|
|
Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME
|
|
|
|
There is one variable PYTHONHOME to determine where libraries are coming
|
|
from for both python2 and python3. This becomes an issue if only one has
|
|
libraries in the specified PYTHONHOME path, but they are using the same
|
|
PYTHONHOME. Creating another variable OEPYTHON3HOME to allow for a way
|
|
to set a different path for python3
|
|
|
|
Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
|
|
|
|
Upstream-Status: Inappropriate [OE specific configuration]
|
|
|
|
---
|
|
Modules/main.c | 17 +++++++++++++----
|
|
1 file changed, 13 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/Modules/main.c b/Modules/main.c
|
|
index acc59c6..407085a 100644
|
|
--- a/Modules/main.c
|
|
+++ b/Modules/main.c
|
|
@@ -1834,10 +1834,19 @@ config_init_home(_PyCoreConfig *config)
|
|
}
|
|
return _Py_INIT_OK();
|
|
}
|
|
-
|
|
- int res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
|
|
- if (res < 0) {
|
|
- return DECODE_LOCALE_ERR("PYTHONHOME", res);
|
|
+ int res;
|
|
+ const char *oepython3home = config_get_env_var("OEPYTHON3HOME");
|
|
+ if (oepython3home) {
|
|
+ res = config_get_env_var_dup(&home, L"OEPYTHON3HOME", "OEPYTHON3HOME");
|
|
+ if (res < 0) {
|
|
+ return DECODE_LOCALE_ERR("OEPYTHON3HOME", res);
|
|
+ }
|
|
+ }
|
|
+ else {
|
|
+ res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
|
|
+ if (res < 0) {
|
|
+ return DECODE_LOCALE_ERR("PYTHONHOME", res);
|
|
+ }
|
|
}
|
|
config->home = home;
|
|
return _Py_INIT_OK();
|