kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit ec249390b13d377da8b77d801247cad11ae46ac1
parent 55f5b34dd9bd641b6e1bed69ec77f1282afc46ca
Author: Joris Vink <joris@coders.se>
Date:   Tue, 15 Oct 2019 10:16:53 +0200

Allow building with python3.8

Diffstat:
Makefile | 4++--
misc/python3-config.sh | 14++++++++++++++
src/kore.c | 2+-
3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 diff --git a/misc/python3-config.sh b/misc/python3-config.sh @@ -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 diff --git a/src/kore.c b/src/kore.c @@ -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);