[jhbuild] environment: add the Python libdir layout to PKG_CONFIG_PATH
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] environment: add the Python libdir layout to PKG_CONFIG_PATH
- Date: Thu, 1 Mar 2018 12:59:55 +0000 (UTC)
commit a622ce38c04bbfc0c3fe085b55592e8247d31cec
Author: Christoph Reiter <creiter src gnome org>
Date: Tue Feb 6 13:00:32 2018 +0100
environment: add the Python libdir layout to PKG_CONFIG_PATH
The host Python on Fedora uses lib64 while jhbuild defaults
to lib, so any distutils based build will install .pc files
into lib64. To make at least pkg-config happy add the host
libdir layout to PKG_CONFIG_PATH as well.
This affects pycairo and pygobject (which only has an optional distutils
based system atm)
https://bugzilla.gnome.org/show_bug.cgi?id=793216
jhbuild/environment.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/environment.py b/jhbuild/environment.py
index a725ea4..0c1d870 100644
--- a/jhbuild/environment.py
+++ b/jhbuild/environment.py
@@ -21,6 +21,7 @@
import sys
import os
+from distutils.sysconfig import get_python_lib
from jhbuild.errors import FatalError, CommandError
from jhbuild.utils.cmds import get_output
@@ -189,6 +190,13 @@ def setup_env(prefix):
pkgconfigdir = os.path.join(libdir, 'pkgconfig')
addpath('PKG_CONFIG_PATH', pkgconfigdatadir)
addpath('PKG_CONFIG_PATH', pkgconfigdir)
+ # XXX: The host Python on Fedora uses lib64 while jhbuild defaults
+ # to lib, so any distutils based build will install .pc files
+ # into lib64. To make at least pkg-config happy add the host
+ # libdir layout as well.
+ host_libdir = os.path.dirname(get_python_lib(True, True, prefix))
+ host_pkgconfigdir = os.path.join(host_libdir, 'pkgconfig')
+ addpath('PKG_CONFIG_PATH', host_pkgconfigdir)
# GI_TYPELIB_PATH
typelibpath = os.path.join(libdir, 'girepository-1.0')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]