diff options
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.patch | 53 |
1 files changed, 24 insertions, 29 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 fdadc6869b..86abfa9d52 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,4 +1,4 @@ | |||
1 | From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001 | 1 | From dd5b4a200cd2fdf7fef627c4b6752f90c00b863a Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 | 3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 |
4 | Subject: [PATCH] python module: do not manipulate the environment when calling | 4 | Subject: [PATCH] python module: do not manipulate the environment when calling |
@@ -8,36 +8,31 @@ Upstream-Status: Inappropriate [oe-core specific] | |||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
9 | 9 | ||
10 | --- | 10 | --- |
11 | mesonbuild/modules/python.py | 12 ------------ | 11 | mesonbuild/modules/python.py | 7 +------ |
12 | 1 file changed, 12 deletions(-) | 12 | 1 file changed, 1 insertion(+), 6 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | 14 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py |
15 | index 422155b..aaf5844 100644 | 15 | index f479ab9..b934bc6 100644 |
16 | --- a/mesonbuild/modules/python.py | 16 | --- a/mesonbuild/modules/python.py |
17 | +++ b/mesonbuild/modules/python.py | 17 | +++ b/mesonbuild/modules/python.py |
18 | @@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency): | 18 | @@ -239,10 +239,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
19 | old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') | 19 | # If python-X.Y.pc exists in LIBPC, we will try to use it |
20 | old_pkg_path = os.environ.get('PKG_CONFIG_PATH') | 20 | def wrap_in_pythons_pc_dir(name: str, env: 'Environment', kwargs: T.Dict[str, T.Any], |
21 | 21 | installation: 'PythonInstallation') -> 'ExternalDependency': | |
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 | - if pkg_libdir: |
25 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir | 25 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir |
26 | - | 26 | try: |
27 | try: | 27 | return PythonPkgConfigDependency(name, env, kwargs, installation) |
28 | self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) | 28 | finally: |
29 | mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})') | 29 | @@ -251,8 +247,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
30 | @@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency): | 30 | os.environ[name] = value |
31 | mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})') | 31 | elif name in os.environ: |
32 | mlog.debug(e) | 32 | del os.environ[name] |
33 | 33 | - set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir) | |
34 | - if old_pkg_path is not None: | 34 | - set_env('PKG_CONFIG_PATH', old_pkg_path) |
35 | - os.environ['PKG_CONFIG_PATH'] = old_pkg_path | 35 | + pass |
36 | - | ||
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(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation') | ||
43 | 36 | ||
37 | candidates.extend([ | ||
38 | functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation), | ||