[Buildroot] [PATCH v13 4/5] package/meson: prevent python include path manipulation

aduskett at gmail.com aduskett at gmail.com
Sun Aug 4 00:14:28 UTC 2019


From: Adam Duskett <Aduskett at gmail.com>

From: https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/meson/meson/

Meson exports a bunch of PKG_CONFIG_ variables which causes a double prefix for
the staging python include directory.

Signed-off-by: Adam Duskett <Aduskett at gmail.com>
---
Changes v11 -> v12:
  - Remove accidental copy and paste in the commit message.

Changes v1 -> v11:
  - Add this patch to the series

 ...-environment-when-calling-pkg-config.patch | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 package/meson/0002-python-module-do-not-manipulate-the-environment-when-calling-pkg-config.patch

diff --git a/package/meson/0002-python-module-do-not-manipulate-the-environment-when-calling-pkg-config.patch b/package/meson/0002-python-module-do-not-manipulate-the-environment-when-calling-pkg-config.patch
new file mode 100644
index 0000000000..a72be80bae
--- /dev/null
+++ b/package/meson/0002-python-module-do-not-manipulate-the-environment-when-calling-pkg-config.patch
@@ -0,0 +1,48 @@
+From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin at gmail.com>
+Date: Mon, 19 Nov 2018 14:24:26 +0100
+Subject: [PATCH] python module: do not manipulate the environment when calling pkg-config
+
+From: https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/meson/meson/
+
+Meson exports a bunch of PKG_CONFIG_ variables which causes a double prefix to
+the python include directory.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
+Signed-off-by: Adam Duskett <aduskett at gmail.com>
+
+---
+ mesonbuild/modules/python.py | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 9cfbd6f..3ff687a 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -76,11 +76,6 @@ class PythonDependency(ExternalDependency):
+                 old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
+                 old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
+ 
+-                os.environ.pop('PKG_CONFIG_PATH', None)
+-
+-                if pkg_libdir:
+-                    os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+-
+                 try:
+                     self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs)
+                     mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir))
+@@ -89,13 +84,6 @@ class PythonDependency(ExternalDependency):
+                     mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir))
+                     mlog.debug(e)
+ 
+-                if old_pkg_path is not None:
+-                    os.environ['PKG_CONFIG_PATH'] = old_pkg_path
+-
+-                if old_pkg_libdir is not None:
+-                    os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir
+-                else:
+-                    os.environ.pop('PKG_CONFIG_LIBDIR', None)
+             else:
+                 mlog.debug('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir))
+ 
-- 
2.21.0



More information about the buildroot mailing list