William A. Kennington III | c596630 | 2020-03-20 13:04:31 -0700 | [diff] [blame] | 1 | From 689e28c49b85311f93f39df70cbee702fc44afb6 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 | --- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | mesonbuild/modules/python.py | 12 ------------ |
| 12 | 1 file changed, 12 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 |
William A. Kennington III | c596630 | 2020-03-20 13:04:31 -0700 | [diff] [blame] | 15 | index 07be318..b770603 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 |
William A. Kennington III | c596630 | 2020-03-20 13:04:31 -0700 | [diff] [blame] | 18 | @@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') |
| 20 | old_pkg_path = os.environ.get('PKG_CONFIG_PATH') |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 21 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | - os.environ.pop('PKG_CONFIG_PATH', None) |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 23 | - |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | - if pkg_libdir: |
| 25 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir |
| 26 | - |
| 27 | try: |
William A. Kennington III | c596630 | 2020-03-20 13:04:31 -0700 | [diff] [blame] | 28 | self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) |
| 29 | mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir)) |
| 30 | @@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency): |
| 31 | mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir)) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | mlog.debug(e) |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame] | 33 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | - 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: |
William A. Kennington III | c596630 | 2020-03-20 13:04:31 -0700 | [diff] [blame] | 42 | mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir)) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 43 | |