--- src/config/makefile.h.orig +++ src/config/makefile.h @@ -2630,12 +2630,12 @@ else GOTPYTHON2 := $(shell command -v python2 2> /dev/null) GOTPYTHON := $(shell command -v python 2> /dev/null) ifdef GOTPYTHON3 - PYTHONVERSION=$(shell python3 -V 2>&1 |cut -c 8-10) + PYTHONVERSION=$(shell python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') else ifdef GOTPYTHON2 - PYTHONVERSION=$(shell python2 -V 2>&1 |cut -c 8-10) + PYTHONVERSION=$(shell python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') else ifdef GOTPYTHON #last try at python2 - PYTHONVERSION=$(shell python -V 2>&1 |cut -c 8-10) + PYTHONVERSION=$(shell python -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') else errorpython3: $(info ) --- src/python/task_python.c.orig +++ src/python/task_python.c @@ -3,7 +3,11 @@ #include "ga.h" #include +#if ( PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 9) +/* might require new headers and code */ +#else #include +#endif #include #include #include "typesf2c.h"