Module: kamailio
Branch: 5.0
Commit: 4a88ee66cc4735b655ac4a2b710217a5b6f1ecd8
URL:
https://github.com/kamailio/kamailio/commit/4a88ee66cc4735b655ac4a2b710217a…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-09-16T15:00:14+02:00
app_python: workaround in Makefile for MacOS, fall-back to python if python2 not
available
(cherry picked from commit a52e7cb1eec84a20432cb959a29a24ee1a8993dd)
---
Modified: src/modules/app_python/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/4a88ee66cc4735b655ac4a2b710217a…
Patch:
https://github.com/kamailio/kamailio/commit/4a88ee66cc4735b655ac4a2b710217a…
---
diff --git a/src/modules/app_python/Makefile b/src/modules/app_python/Makefile
index c9ad254c3b..9898ebc3f5 100644
--- a/src/modules/app_python/Makefile
+++ b/src/modules/app_python/Makefile
@@ -9,7 +9,12 @@ NAME=app_python.so
# the following to point to the correct instance. Module has been tested
# to work with 2.6 and 2.5. Python 2.4 has been only confirmed to compile,
# but no testing has been done with that.
-PYTHON?=python2
+PYTHON=$(shell which python2)
+
+# workaround for some OS (like MacOS) that don't have a python2 link
+ifeq ($(PYTHON),)
+PYTHON=python
+endif
PYTHON_VERSION=${shell ${PYTHON} -c "import distutils.sysconfig;print
distutils.sysconfig.get_config_var('VERSION')"}
PYTHON_LIBDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print
distutils.sysconfig.get_config_var('LIBDIR')"}