mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #3928 from chewi/master
Respect the PKG_CONFIG environment variable when building
This commit is contained in:
commit
7585136a3d
7
setup.py
7
setup.py
|
@ -242,8 +242,9 @@ LCMS_ROOT = None
|
|||
|
||||
def _pkg_config(name):
|
||||
try:
|
||||
command_libs = ["pkg-config", "--libs-only-L", name]
|
||||
command_cflags = ["pkg-config", "--cflags-only-I", name]
|
||||
command = os.environ.get("PKG_CONFIG", "pkg-config")
|
||||
command_libs = [command, "--libs-only-L", name]
|
||||
command_cflags = [command, "--cflags-only-I", name]
|
||||
if not DEBUG:
|
||||
command_libs.append("--silence-errors")
|
||||
command_cflags.append("--silence-errors")
|
||||
|
@ -347,7 +348,7 @@ class pil_build_ext(build_ext):
|
|||
_add_directory(include_dirs, "src/libImaging")
|
||||
|
||||
pkg_config = None
|
||||
if _cmd_exists("pkg-config"):
|
||||
if _cmd_exists(os.environ.get("PKG_CONFIG", "pkg-config")):
|
||||
pkg_config = _pkg_config
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user