From bfaf440fb2823b4f153c029e53f3e11f063d4195 Mon Sep 17 00:00:00 2001 From: philicious Date: Tue, 16 Apr 2024 22:34:47 +0200 Subject: [PATCH] Fix building against Python3.12 on MacOS with make by prefering python3-embed over python3 (as CMakeLists.txt does) --- client/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/Makefile b/client/Makefile index f9e3c9382..dff092b03 100644 --- a/client/Makefile +++ b/client/Makefile @@ -281,16 +281,16 @@ endif ## Python3 (optional) ifneq ($(SKIPPYTHON),1) - PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags python3 2>/dev/null) - PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs python3 2>/dev/null) +# since python3.8, applications willing to embed python must use -embed: + PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags python3-embed 2>/dev/null) + PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs python3-embed 2>/dev/null) ifneq ($(PYTHONLDLIBS),) PYTHONLIBLD = $(PYTHONLDLIBS) PYTHONLIBINC = $(subst -I,-isystem ,$(PYTHONINCLUDES)) PYTHON_FOUND = 1 else - # since python3.8, applications willing to embed python must use -embed: - PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags python3-embed 2>/dev/null) - PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs python3-embed 2>/dev/null) + PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags python3 2>/dev/null) + PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs python3 2>/dev/null) ifneq ($(PYTHONLDLIBS),) PYTHONLIBLD = $(PYTHONLDLIBS) PYTHONLIBINC = $(subst -I,-isystem ,$(PYTHONINCLUDES))