Skip to content

Commit

Permalink
app_python: workaround in Makefile for MacOS, fall-back to python if …
Browse files Browse the repository at this point in the history
…python2 not available
  • Loading branch information
henningw committed Sep 16, 2018
1 parent 31498ca commit a52e7cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/app_python/Makefile
Expand Up @@ -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')"}
Expand Down

0 comments on commit a52e7cb

Please sign in to comment.