Module: kamailio Branch: master Commit: a52e7cb1eec84a20432cb959a29a24ee1a8993dd URL: https://github.com/kamailio/kamailio/commit/a52e7cb1eec84a20432cb959a29a24ee...
Author: Henning Westerholt hw@kamailio.org Committer: Henning Westerholt hw@kamailio.org Date: 2018-09-16T11:09:12+02:00
app_python: workaround in Makefile for MacOS, fall-back to python if python2 not available
---
Modified: src/modules/app_python/Makefile
---
Diff: https://github.com/kamailio/kamailio/commit/a52e7cb1eec84a20432cb959a29a24ee... Patch: https://github.com/kamailio/kamailio/commit/a52e7cb1eec84a20432cb959a29a24ee...
---
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')"}