Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca 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 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 15 | index 9cfbd6f..3ff687a 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 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 18 | @@ -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 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: |
| 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 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: |
| 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 | |