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