Module: kamailio
Branch: master
Commit: 35251dfbd17d27478063be56f7f96ca62c8d480b
URL:
https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2020-04-12T11:56:40+02:00
Merge pull request #2282 from micmac1/py3-detect
app_python3: update Python3 detection mechanism
---
Modified: src/modules/app_python3/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca…
Patch:
https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca…
---
diff --git a/src/modules/app_python3/Makefile b/src/modules/app_python3/Makefile
index 1c9ff1c6b6..d31cd6ab10 100644
--- a/src/modules/app_python3/Makefile
+++ b/src/modules/app_python3/Makefile
@@ -11,18 +11,16 @@ NAME=app_python3.so
# but no testing has been done with that.
PYTHON3?=python3
-PYTHON3_VERSION=${shell ${PYTHON3} -c "import
distutils.sysconfig;print(distutils.sysconfig.get_config_var('VERSION'))"}
-PYTHON3_LIBDIR=${shell ${PYTHON3} -c "import
distutils.sysconfig;print(distutils.sysconfig.get_config_var('LIBDIR'))"}
-PYTHON3_LDFLAGS=${shell ${PYTHON3} -c "import
distutils.sysconfig;print(distutils.sysconfig.get_config_var('LINKFORSHARED'))"}
-PYTHON3_INCDIR=${shell ${PYTHON3} -c "import
distutils.sysconfig;print(distutils.sysconfig.get_python_inc())"}
-
-LIBS=${shell ${PYTHON3}-config --ldflags}
+LIBS=${shell \
+ tmp_py3_libs=$$(${PYTHON3}-config --ldflags --embed) || \
+ tmp_py3_libs=$$(${PYTHON3}-config --ldflags); \
+ echo $$tmp_py3_libs}
ifeq ($(OS), freebsd)
LIBS+=-pthread
endif
-DEFS+=-I${PYTHON3_INCDIR}
+DEFS+=${shell ${PYTHON3}-config --includes}
include ../../Makefile.modules