1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-03 08:21:58 +03:00

allow pkg-config binary to be set by env

https://bugzilla.redhat.com/show_bug.cgi?id=1350523
This commit is contained in:
Markus Rothe
2016-06-27 17:55:28 +02:00
committed by Cole Robinson
parent 8a42cdd043
commit bdfa319eac

View File

@ -28,6 +28,8 @@ _pkgcfg = -1
def get_pkgcfg(do_fail=True):
global _pkgcfg
if _pkgcfg == -1:
_pkgcfg = os.getenv('PKG_CONFIG')
if _pkgcfg is None:
_pkgcfg = distutils.spawn.find_executable("pkg-config")
if _pkgcfg is None and do_fail:
raise Exception("pkg-config binary is required to compile libvirt-python")