1
0
mirror of https://github.com/thp/pyotherside.git synced 2025-01-17 23:22:53 +08:00

Fix python3-config invocation

It was spitting out the Usage message on stdout, messing up g++
invocations.
This commit is contained in:
Dan Church 2019-06-10 11:42:26 -05:00
parent 7e679dbca8
commit d00b9cd1dd
No known key found for this signature in database
GPG Key ID: EA2BF379CD2CDBD0

View File

@ -23,8 +23,11 @@ case "$WHICH_FLAG" in
--libs)
# Python 3.8 needs --embed, but previous versions do not have it:
# https://github.com/python/cpython/pull/13500
"$PYTHON_CONFIG" --ldflags --libs --embed 2>/dev/null ||
if "$PYTHON_CONFIG" --ldflags --libs --embed >/dev/null 2>&1; then
"$PYTHON_CONFIG" --ldflags --libs --embed
else
"$PYTHON_CONFIG" --ldflags --libs
fi
;;
--includes)
"$PYTHON_CONFIG" --includes