blob: bf715d1e9f41743d687633a95906e5b121ffd911 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001
Brad Bishopa5c52ff2018-11-23 10:55:50 +13002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 19 Nov 2018 14:24:26 +0100
4Subject: [PATCH] python module: do not manipulate the environment when calling
5 pkg-config
6
7Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Brad Bishop19323692019-04-05 15:28:33 -04009
Brad Bishopa5c52ff2018-11-23 10:55:50 +130010---
Brad Bishop19323692019-04-05 15:28:33 -040011 mesonbuild/modules/python.py | 12 ------------
12 1 file changed, 12 deletions(-)
Brad Bishopa5c52ff2018-11-23 10:55:50 +130013
14diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
Brad Bishop19323692019-04-05 15:28:33 -040015index 9cfbd6f..3ff687a 100644
Brad Bishopa5c52ff2018-11-23 10:55:50 +130016--- a/mesonbuild/modules/python.py
17+++ b/mesonbuild/modules/python.py
Brad Bishop19323692019-04-05 15:28:33 -040018@@ -75,11 +75,6 @@ class PythonDependency(ExternalDependency):
19 old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
20 old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
Brad Bishopa5c52ff2018-11-23 10:55:50 +130021
Brad Bishop19323692019-04-05 15:28:33 -040022- os.environ.pop('PKG_CONFIG_PATH', None)
Brad Bishopa5c52ff2018-11-23 10:55:50 +130023-
Brad Bishop19323692019-04-05 15:28:33 -040024- if pkg_libdir:
25- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
26-
27 try:
28 self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs)
29 mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir))
30@@ -88,13 +83,6 @@ class PythonDependency(ExternalDependency):
31 mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir))
32 mlog.debug(e)
Brad Bishopa5c52ff2018-11-23 10:55:50 +130033
Brad Bishop19323692019-04-05 15:28:33 -040034- if old_pkg_path is not None:
35- os.environ['PKG_CONFIG_PATH'] = old_pkg_path
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('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir))
43