2
0
Эх сурвалжийг харах

app_python: workaround in Makefile for MacOS, fall-back to python if python2 not available

Henning Westerholt 7 жил өмнө
parent
commit
a52e7cb1ee

+ 6 - 1
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')"}