From 1b97fa4599aee10639d24b9babad963ee2aa9a24 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 27 Apr 2018 15:18:22 +0200 Subject: [PATCH] More Python2 --- bin/irpf90_indent | 2 +- bin/profile | 2 +- pip/irpman | 2 +- src/Makefile | 2 +- src/irpf90_python.exe | 2 +- src/preprocessed_text.py | 2 +- tools/commit-msg | 2 +- tools/post-commit | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/irpf90_indent b/bin/irpf90_indent index 9702ae2..391d438 100755 --- a/bin/irpf90_indent +++ b/bin/irpf90_indent @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # IRPF90 is a Fortran90 preprocessor written in Python for programming using # the Implicit Reference to Parameters (IRP) method. # Copyright (C) 2009 Anthony SCEMAMA diff --git a/bin/profile b/bin/profile index 9772140..94ebc71 100755 --- a/bin/profile +++ b/bin/profile @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # IRPF90 is a Fortran90 preprocessor written in Python for programming using # the Implicit Reference to Parameters (IRP) method. # Copyright (C) 2009 Anthony SCEMAMA diff --git a/pip/irpman b/pip/irpman index 9aedc6f..da437cf 100755 --- a/pip/irpman +++ b/pip/irpman @@ -28,7 +28,7 @@ function run () { -cat << EOF | exec python - $@ +cat << EOF | exec python2 - $@ import sys, os from irpf90_libs.irpf90_t import mandir diff --git a/src/Makefile b/src/Makefile index 366d8aa..3bedafe 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -PYTHON=python +PYTHON=python2 PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])") HAS_CYTHON=$(shell bash -c "which cython &> /dev/null && echo 1 || echo 0") ifneq ($(HAS_CYTHON),0) diff --git a/src/irpf90_python.exe b/src/irpf90_python.exe index 858b418..c613031 100755 --- a/src/irpf90_python.exe +++ b/src/irpf90_python.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # IRPF90 is a Fortran90 preprocessor written in Python for programming using # the Implicit Reference to Parameters (IRP) method. # Copyright (C) 2009 Anthony SCEMAMA diff --git a/src/preprocessed_text.py b/src/preprocessed_text.py index eb3aee8..4b7a8fd 100644 --- a/src/preprocessed_text.py +++ b/src/preprocessed_text.py @@ -321,7 +321,7 @@ def execute_templates(text): file.close() # Execute shell import os - pipe = os.popen("python < %s"%(scriptname),'r') + pipe = os.popen("python2 < %s"%(scriptname),'r') lines = pipe.readlines() pipe.close() result += get_text(lines,scriptname) diff --git a/tools/commit-msg b/tools/commit-msg index de8a1e9..5c37748 100755 --- a/tools/commit-msg +++ b/tools/commit-msg @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os,sys ROOT = os.path.dirname(__file__)+'/../../' diff --git a/tools/post-commit b/tools/post-commit index e1a21b8..4708a76 100755 --- a/tools/post-commit +++ b/tools/post-commit @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os ROOT = os.path.dirname(__file__)+'/../../'