Module: kamailio Branch: 5.1 Commit: b6e849c9f4463657534d823f5c8cfb1d85f6bdaa URL: https://github.com/kamailio/kamailio/commit/b6e849c9f4463657534d823f5c8cfb1d...
Author: Henning Westerholt hw@kamailio.org Committer: Henning Westerholt hw@kamailio.org Date: 2018-09-16T15:00:20+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/b6e849c9f4463657534d823f5c8cfb1d... Patch: https://github.com/kamailio/kamailio/commit/b6e849c9f4463657534d823f5c8cfb1d...
---
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')"}