summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch')
-rw-r--r--meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch56
1 files changed, 25 insertions, 31 deletions
diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index eb0e90dbdd..f654447013 100644
--- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,43 +1,37 @@
1From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001 1From 6c3734f533ee7ad493188c8fc17bb1c65b65f0bd Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 19 Nov 2018 14:24:26 +0100 3Date: Mon, 19 Nov 2018 14:24:26 +0100
4Subject: [PATCH] python module: do not manipulate the environment when calling 4Subject: [PATCH] python module: do not manipulate the environment when calling
5
5 pkg-config 6 pkg-config
6 7
7Upstream-Status: Inappropriate [oe-core specific] 8Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9
10--- 10---
11 mesonbuild/modules/python.py | 12 ------------ 11 mesonbuild/dependencies/python.py | 6 +-----
12 1 file changed, 12 deletions(-) 12 1 file changed, 1 insertion(+), 5 deletions(-)
13 13
14diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py 14diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
15index 07be318..b770603 100644 15index ab040b5..a34b271 100644
16--- a/mesonbuild/modules/python.py 16--- a/mesonbuild/dependencies/python.py
17+++ b/mesonbuild/modules/python.py 17+++ b/mesonbuild/dependencies/python.py
18@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency): 18@@ -412,9 +412,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
19 old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') 19 empty.name = 'python'
20 old_pkg_path = os.environ.get('PKG_CONFIG_PATH') 20 return empty
21 21
22- os.environ.pop('PKG_CONFIG_PATH', None) 22- old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None)
23- 23- old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None)
24- if pkg_libdir: 24- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
25- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
26-
27 try: 25 try:
28 self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) 26 return PythonPkgConfigDependency(name, env, kwargs, installation, True)
29 mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir)) 27 finally:
30@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency): 28@@ -423,8 +420,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
31 mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir)) 29 os.environ[name] = value
32 mlog.debug(e) 30 elif name in os.environ:
33 31 del os.environ[name]
34- if old_pkg_path is not None: 32- set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir)
35- os.environ['PKG_CONFIG_PATH'] = old_pkg_path 33- set_env('PKG_CONFIG_PATH', old_pkg_path)
36- 34+ pass
37- if old_pkg_libdir is not None:
38- os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir
39- else:
40- os.environ.pop('PKG_CONFIG_LIBDIR', None)
41 else:
42 mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
43 35
36 # Otherwise this doesn't fulfill the interface requirements
37 wrap_in_pythons_pc_dir.log_tried = PythonPkgConfigDependency.log_tried # type: ignore[attr-defined]