Add --embed to python-config for legacy build

Newer versions of Python (v3.9) do not include the python library
in their python-config --ldflags unless you also pass --embed.
This commit is contained in:
Richard Berger
2020-12-15 16:07:49 -05:00
parent aca2eefce5
commit 588198c5dd
2 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,6 @@
# See the README file for more explanation # See the README file for more explanation
python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :) python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :)
python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags || :) python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags --embed > /dev/null 2>&1 && python-config --ldflags --embed || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) )
python_SYSPATH = python_SYSPATH =
PYTHON=python PYTHON=python

View File

@ -2,6 +2,6 @@
# See the README file for more explanation # See the README file for more explanation
python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || (which python-config > /dev/null 2>&1 && python-config --includes || :)) python_SYSINC = $(shell which python3-config > /dev/null 2>&1 && python3-config --includes || (which python-config > /dev/null 2>&1 && python-config --includes || :))
python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags || (which python-config > /dev/null 2>&1 && python-config --ldflags || :)) python_SYSLIB = $(shell which python3-config > /dev/null 2>&1 && python3-config --ldflags --embed > /dev/null 2>&1 && python3-config --ldflags --embed || (which python3-config > /dev/null 2>&1 && python3-config --ldflags || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) ) )
python_SYSPATH = python_SYSPATH =
PYTHON=$(shell which python3 > /dev/null 2>&1 && echo python3 || echo python) PYTHON=$(shell which python3 > /dev/null 2>&1 && echo python3 || echo python)