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 | 54 |
1 files changed, 24 insertions, 30 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..2e0a4b1bbe 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 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001 | 1 | From e85683698aa3556bf14fc6d35f2c067f16af520b 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,30 @@ 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/dependencies/python.py | 6 +----- |
12 | 1 file changed, 12 deletions(-) | 12 | 1 file changed, 1 insertion(+), 5 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | 14 | diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py |
15 | index 07be318..b770603 100644 | 15 | index 9aea6bd..8c13ede 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 | @@ -380,9 +380,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 | @@ -391,8 +388,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 | candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation)) | ||
37 | # We only need to check both, if a python install has a LIBPC. It might point to the wrong location, | ||