add option to build against non-default python3 package
This commit is contained in:
1 parent
4a119a73f0
commit
f3e9a79ca4
5 files changed
+20
-9
No files matched your search
+5
-5
@@ -282,15 +282,15 @@ endif
|
||||
## Python3 (optional)
|
||||
ifneq ($(SKIPPYTHON),1)
|
||||
# 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_PKGCONFIG)-embed 2>/dev/null)
|
||||
PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs $(PYTHON3_PKGCONFIG)-embed 2>/dev/null)
|
||||
ifneq ($(PYTHONLDLIBS),)
|
||||
PYTHONLIBLD = $(PYTHONLDLIBS)
|
||||
PYTHONLIBINC = $(subst -I,-isystem ,$(PYTHONINCLUDES))
|
||||
PYTHON_FOUND = 1
|
||||
else
|
||||
PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags python3 2>/dev/null)
|
||||
PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs python3 2>/dev/null)
|
||||
PYTHONINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags $(PYTHON3_PKGCONFIG) 2>/dev/null)
|
||||
PYTHONLDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs $(PYTHON3_PKGCONFIG) 2>/dev/null)
|
||||
ifneq ($(PYTHONLDLIBS),)
|
||||
PYTHONLIBLD = $(PYTHONLDLIBS)
|
||||
PYTHONLIBINC = $(subst -I,-isystem ,$(PYTHONINCLUDES))
|
||||
@@ -531,7 +531,7 @@ ifeq ($(SKIPPYTHON),1)
|
||||
$(info Python3 library: skipped)
|
||||
else
|
||||
ifeq ($(PYTHON_FOUND),1)
|
||||
$(info Python3 library: Python3 v$(shell $(PKG_CONFIG_ENV) pkg-config --modversion python3) found, enabled)
|
||||
$(info Python3 library: Python3 v$(shell $(PKG_CONFIG_ENV) pkg-config --modversion $(PYTHON3_PKGCONFIG)) found, enabled)
|
||||
else
|
||||
$(info Python3 library: Python3 not found, disabled)
|
||||
endif
|
||||
|
||||
Reference in new issue
Block a user