From d29715f509c7c460d6705183301eda14da217755 Mon Sep 17 00:00:00 2001 From: Neil Wu Date: Thu, 16 Apr 2020 11:45:09 -0400 Subject: [PATCH] Python 3 updates (#13) * removed future imports * updated python-config --- config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk | 2 +- config/defaults/config.LINUX_INTEL_OPENMPI.mk | 2 +- python/pyHyp.py | 2 -- src/python/f2py/Makefile | 2 +- src/python/f2py/get_f2py.py | 1 - src/python/f2py/importTest.py | 1 - 6 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk b/config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk index b222749..2ffcb22 100644 --- a/config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk +++ b/config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk @@ -41,5 +41,5 @@ PETSC_LINKER_FLAGS=${PETSC_LIB} # Define potentially different python, python-config and f2py executables: PYTHON = python -PYTHON-CONFIG = python-config +PYTHON-CONFIG = python3-config # use python-config for python 2 F2PY = f2py diff --git a/config/defaults/config.LINUX_INTEL_OPENMPI.mk b/config/defaults/config.LINUX_INTEL_OPENMPI.mk index 00136d7..d76b9dd 100644 --- a/config/defaults/config.LINUX_INTEL_OPENMPI.mk +++ b/config/defaults/config.LINUX_INTEL_OPENMPI.mk @@ -40,5 +40,5 @@ PETSC_LINKER_FLAGS=${PETSC_LIB} # Define potentially different python, python-config and f2py executables: PYTHON = python -PYTHON-CONFIG = python-config +PYTHON-CONFIG = python3-config # use python-config for python 2 F2PY = f2py diff --git a/python/pyHyp.py b/python/pyHyp.py index 295a5da..811bced 100644 --- a/python/pyHyp.py +++ b/python/pyHyp.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import division """ pyHyp diff --git a/src/python/f2py/Makefile b/src/python/f2py/Makefile index 2ccfc79..5f1fd8b 100644 --- a/src/python/f2py/Makefile +++ b/src/python/f2py/Makefile @@ -33,7 +33,7 @@ all: @echo "#------------------------------------------------------#" # Generate Numpy inlude directory - $(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'from __future__ import print_function; import numpy; print(numpy.get_include())')) + $(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'import numpy; print(numpy.get_include())')) @echo "#------------------------------------------------------#" @echo Numpy Include Directory: $(NUMPY_INCLUDES) @echo "#------------------------------------------------------#" diff --git a/src/python/f2py/get_f2py.py b/src/python/f2py/get_f2py.py index 838bcc0..c1316b7 100644 --- a/src/python/f2py/get_f2py.py +++ b/src/python/f2py/get_f2py.py @@ -1,4 +1,3 @@ -from __future__ import print_function #------------- VERY IMPORTANT ------------ # This script is necessary since f2py INSISTS on priting crap out when diff --git a/src/python/f2py/importTest.py b/src/python/f2py/importTest.py index d60f56e..fd8b439 100644 --- a/src/python/f2py/importTest.py +++ b/src/python/f2py/importTest.py @@ -1,5 +1,4 @@ #! /usr/bin/env python -from __future__ import print_function import sys name = 'hyp'