From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 17 Aug 2019 20:16:34 +0000
Subject: Use Python 3 in Makefile

Forwarded: not-needed
---
 Makefile | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index b29d4ad..3113da2 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ DIRS := $(foreach dir,$(SUBPKG1),$(PKG1)/$(dir))
 
 # this is used for cython files on recursive call to make
 PYX = $(wildcard *.pyx)
+PYTHON=python3
+PYTEST=pytest-3
+CYTHON=cython3
 
 MPI4PY_INCL = $(shell python -c "import mpi4py; print mpi4py.get_include()")
 
@@ -16,20 +19,20 @@ all : build
 .PHONY : $(DIRS) bench build
 
 build :
-	python setup.py build_ext --inplace
+	$(PYTHON) setup.py build_ext --inplace
 
 $(DIRS) :
-	cd $@;  python $(ROOT)/pyzoltan/core/generator.py
+	cd $@;  $(PYTHON) $(ROOT)/pyzoltan/core/generator.py
 	$(MAKE) -f $(MAKEFILE) -C $@ cythoncpp ROOT=$(ROOT)
 
 %.c : %.pyx
-	python `which cython` -I$(SRC) -I$(MPI4PY_INCL) $<
+	$(PYTHON) `which $(CYTHON)` -I$(SRC) -I$(MPI4PY_INCL) $<
 
 %.cpp : %.pyx
-	python `which cython` --cplus -I$(SRC) -I$(MPI4PY_INCL) $<
+	$(PYTHON) `which $(CYTHON)` --cplus -I$(SRC) -I$(MPI4PY_INCL) $<
 
 %.html : %.pyx
-	python `which cython` -I$(SRC) -I$(MPI4PY_INCL) -a $<
+	$(PYTHON) `which $(CYTHON)` -I$(SRC) -I$(MPI4PY_INCL) -a $<
 
 cython : $(PYX:.pyx=.c)
 
@@ -41,7 +44,7 @@ annotate :
 	for f in $(DIRS); do $(MAKE) -f $(MAKEFILE) -C $${f} _annotate ROOT=$(ROOT); done
 
 clean :
-	python setup.py clean
+	$(PYTHON) setup.py clean
 	-for dir in $(DIRS); do rm -f $$dir/*.c; done
 	-for dir in $(DIRS); do rm -f $$dir/*.cpp; done
 
@@ -50,19 +53,19 @@ cleanall : clean
 #	-rm $(patsubst %.pyx,%.c,$(wildcard $(PKG)/*/*.pyx))
 
 test :
-	python `which pytest` -m 'not slow' pysph
+	$(PYTHON) `which $(PYTEST)` -m 'not slow' pysph
 
 testall :
-	python `which pytest` pysph
+	$(PYTHON) `which $(PYTEST)` pysph
 
 epydoc :
-	python cython-epydoc.py --config epydoc.cfg pysph
+	$(PYTHON) cython-epydoc.py --config epydoc.cfg pysph
 
 doc :
 	cd docs; make html
 
 develop :
-	python setup.py develop
+	$(PYTHON) setup.py develop
 
 install :
-	python setup.py install
+	$(PYTHON) setup.py install
