summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch')
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch27
1 files changed, 13 insertions, 14 deletions
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index 86abfa9d52..f01a667818 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,4 +1,4 @@
-From dd5b4a200cd2fdf7fef627c4b6752f90c00b863a Mon Sep 17 00:00:00 2001
+From 2e9582167bf9d3273004edb2637310531f0155ab Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 19 Nov 2018 14:24:26 +0100
Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -8,25 +8,24 @@ Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- mesonbuild/modules/python.py | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
+ mesonbuild/modules/python.py | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index f479ab9..b934bc6 100644
+index 3bbccd1..fda7a25 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
-@@ -239,10 +239,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
- # If python-X.Y.pc exists in LIBPC, we will try to use it
- def wrap_in_pythons_pc_dir(name: str, env: 'Environment', kwargs: T.Dict[str, T.Any],
- installation: 'PythonInstallation') -> 'ExternalDependency':
+@@ -277,9 +277,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+ # there is no LIBPC, so we can't search in it
+ return NotFoundDependency('python', env)
+
- old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None)
- old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None)
-- if pkg_libdir:
-- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
try:
- return PythonPkgConfigDependency(name, env, kwargs, installation)
+ return PythonPkgConfigDependency(name, env, kwargs, installation, True)
finally:
-@@ -251,8 +247,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+@@ -288,8 +285,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
os.environ[name] = value
elif name in os.environ:
del os.environ[name]
@@ -34,5 +33,5 @@ index f479ab9..b934bc6 100644
- set_env('PKG_CONFIG_PATH', old_pkg_path)
+ pass
- candidates.extend([
- functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation),
+ candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation))
+ # We only need to check both, if a python install has a LIBPC. It might point to the wrong location,