Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 1 | From dd5b4a200cd2fdf7fef627c4b6752f90c00b863a Mon Sep 17 00:00:00 2001 |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 |
| 4 | Subject: [PATCH] python module: do not manipulate the environment when calling |
| 5 | pkg-config |
| 6 | |
| 7 | Upstream-Status: Inappropriate [oe-core specific] |
| 8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 10 | --- |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 11 | mesonbuild/modules/python.py | 7 +------ |
| 12 | 1 file changed, 1 insertion(+), 6 deletions(-) |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 13 | |
| 14 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 15 | index f479ab9..b934bc6 100644 |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 16 | --- a/mesonbuild/modules/python.py |
| 17 | +++ b/mesonbuild/modules/python.py |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 18 | @@ -239,10 +239,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
| 19 | # If python-X.Y.pc exists in LIBPC, we will try to use it |
| 20 | def wrap_in_pythons_pc_dir(name: str, env: 'Environment', kwargs: T.Dict[str, T.Any], |
| 21 | installation: 'PythonInstallation') -> 'ExternalDependency': |
| 22 | - old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None) |
| 23 | - old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None) |
| 24 | - if pkg_libdir: |
| 25 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir |
| 26 | try: |
| 27 | return PythonPkgConfigDependency(name, env, kwargs, installation) |
| 28 | finally: |
| 29 | @@ -251,8 +247,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
| 30 | os.environ[name] = value |
| 31 | elif name in os.environ: |
| 32 | del os.environ[name] |
| 33 | - set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir) |
| 34 | - set_env('PKG_CONFIG_PATH', old_pkg_path) |
| 35 | + pass |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 36 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 37 | candidates.extend([ |
| 38 | functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation), |