Allow building with python3.8

This commit is contained in:
Joris Vink 2019-10-15 10:16:53 +02:00
parent 55f5b34dd9
commit ec249390b1
3 changed files with 17 additions and 3 deletions

View File

@ -88,8 +88,8 @@ endif
ifneq ("$(PYTHON)", "")
S_SRC+=src/python.c
KORE_PYTHON_LIB?=$(shell python3-config --ldflags)
KORE_PYTHON_INC?=$(shell python3-config --includes)
KORE_PYTHON_LIB?=$(shell ./misc/python3-config.sh --ldflags)
KORE_PYTHON_INC?=$(shell ./misc/python3-config.sh --includes)
LDFLAGS+=$(KORE_PYTHON_LIB)
CFLAGS+=$(KORE_PYTHON_INC) -DKORE_USE_PYTHON
FEATURES+=-DKORE_USE_PYTHON

14
misc/python3-config.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "python3-flags.sh [--ldflags|--includes]"
exit 1
fi
python3-config $1 --embed > /dev/null 2>&1
if [ $? -eq 0 ]; then
python3-config $1 --embed
else
python3-config $1
fi

View File

@ -144,7 +144,7 @@ version(void)
printf("single ");
#endif
#if defined(KORE_USE_PYTHON)
printf("python ");
printf("python-%s ", PY_VERSION);
#endif
printf("\n");
exit(0);