diff options
author | 2020-09-08 15:25:11 -0600 | |
---|---|---|
committer | 2020-09-08 15:25:11 -0600 | |
commit | f2b628933a8d58bebe71a1a7875b8ee7f2cfbacd (patch) | |
tree | 8df7910600d331c6a625f91b248c7dfb39b893e9 | |
parent | Added tag release-pypy2.7-v7.3.2rc1 for changeset 9d418ec24144 (diff) | |
download | pypy-f2b628933a8d58bebe71a1a7875b8ee7f2cfbacd.tar.gz pypy-f2b628933a8d58bebe71a1a7875b8ee7f2cfbacd.tar.bz2 pypy-f2b628933a8d58bebe71a1a7875b8ee7f2cfbacd.zip |
Respect system PKG_CONFIG environment variable
Many cross-compilation setups use custom pkg-config wrappers to ensure that
the proper version of libraries get linked against. The conventional way to
specify such a wrapper is via the PKG_CONFIG environment variable, so change
the default pkg_config logic to use the contents of that variable if available.
-rw-r--r-- | rpython/translator/platform/posix.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py index d53449abe5..4463831b9e 100644 --- a/rpython/translator/platform/posix.py +++ b/rpython/translator/platform/posix.py @@ -62,7 +62,8 @@ class BasePosix(Platform): def _pkg_config(self, lib, opt, default, check_result_dir=False): try: - ret, out, err = _run_subprocess("pkg-config", [lib, opt]) + pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') + ret, out, err = _run_subprocess(pkg_config, [lib, opt]) except OSError as e: err = str(e) ret = 1 |