From ade8367e053e550c664719437a5b383f70bd01a9 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 27 Apr 2018 19:04:37 +0200 Subject: [PATCH 1/4] Version 1.3.2 --- Makefile | 3 ++- version | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 88b078f..29ca5d1 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,13 @@ include make.config .PHONY: default clean veryclean archive default: make.config - cd src && BUILD_SYSTEM=make $(MAKE) + cd src $(MAKE) clean: - bash -c "[[ -f lib/libezfio.a ]] && rm $$PWD/lib/*" - bash -c "[[ -f Python/ezfio.py ]] && rm $$PWD/Python/*" - bash -c "[[ -f Ocaml/ezfio.ml ]] && rm $$PWD/Ocaml/*" + - bash -c "[[ -f Bash/ezfio.sh ]] && rm $$PWD/Bash/*" - $(MAKE) -C $$PWD/src veryclean archive: distclean diff --git a/version b/version index f406e04..0c794cf 100644 --- a/version +++ b/version @@ -1 +1 @@ -VERSION=1.3.1 +VERSION=1.3.2 From ef8ac2a2c5834b99b4b8aa18d14e796424bf0696 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 30 Apr 2018 19:49:11 +0200 Subject: [PATCH 2/4] Python2 --- bin/archive_ezfio.py | 2 +- bin/unarchive_ezfio.py | 2 +- configure.py | 2 +- src/create_ocaml.py | 2 +- src/create_python.py | 2 +- src/ezfio-head.py | 2 +- src/groups.py | 2 +- src/groups_templates.py | 2 +- src/read_config.py | 2 +- src/test.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/archive_ezfio.py b/bin/archive_ezfio.py index cb09c9f..b2fa22c 100755 --- a/bin/archive_ezfio.py +++ b/bin/archive_ezfio.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import os diff --git a/bin/unarchive_ezfio.py b/bin/unarchive_ezfio.py index 8a1f7ef..96b9077 100755 --- a/bin/unarchive_ezfio.py +++ b/bin/unarchive_ezfio.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import os diff --git a/configure.py b/configure.py index 0f86bb3..01ab439 100755 --- a/configure.py +++ b/configure.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os,sys diff --git a/src/create_ocaml.py b/src/create_ocaml.py index db2cc06..0445d1a 100755 --- a/src/create_ocaml.py +++ b/src/create_ocaml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/create_python.py b/src/create_python.py index 1b5e0b4..5954d8d 100755 --- a/src/create_python.py +++ b/src/create_python.py @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/ezfio-head.py b/src/ezfio-head.py index d38091d..71e85c1 100644 --- a/src/ezfio-head.py +++ b/src/ezfio-head.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/groups.py b/src/groups.py index 27f69c8..d867000 100644 --- a/src/groups.py +++ b/src/groups.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/groups_templates.py b/src/groups_templates.py index 1150088..4098b76 100644 --- a/src/groups_templates.py +++ b/src/groups_templates.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/read_config.py b/src/read_config.py index 743377a..3508c9c 100644 --- a/src/read_config.py +++ b/src/read_config.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # diff --git a/src/test.py b/src/test.py index e6540d1..d781fb7 100755 --- a/src/test.py +++ b/src/test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # EZFIO is an automatic generator of I/O libraries # Copyright (C) 2009 Anthony SCEMAMA, CNRS # From 214c57a1fe3e3304ed89b7a9d538cadb800edfb2 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 30 Apr 2018 19:53:30 +0200 Subject: [PATCH 3/4] Python2 --- Makefile | 2 +- README.rst | 4 ++-- build.ninja | 2 +- configure.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 29ca5d1..d56f8a5 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ archive: distclean rm -rf EZFIO make.config: - python configure.py + ./configure.py veryclean: $(MAKE) -C src veryclean diff --git a/README.rst b/README.rst index 459f1c8..32ff6e5 100644 --- a/README.rst +++ b/README.rst @@ -186,7 +186,7 @@ Create a file named ``create_input.py`` with: .. code-block:: python - #!/usr/bin/python + #!/usr/bin/python2 import sys EZFIO = "./EZFIO" # Put here the absolute path to the EZFIO directory @@ -229,7 +229,7 @@ Execute the script: .. code-block:: bash - $ python create_input.py + $ python2 create_input.py 18.0 The printed mass is correct, and a new directory (``Water``) was created with our data: diff --git a/build.ninja b/build.ninja index bafb5d1..feeb8fa 100644 --- a/build.ninja +++ b/build.ninja @@ -1,7 +1,7 @@ include version rule build_generated_ninja - command = python configure.py + command = python2 configure.py description = Creating generated.ninja rule run_ninja diff --git a/configure.py b/configure.py index 01ab439..cdedd88 100755 --- a/configure.py +++ b/configure.py @@ -116,11 +116,11 @@ rule build_libezfio_irp_a description = Building libezfio_irp.a rule build_python - command = cd src ; python create_python.py + command = cd src ; python2 create_python.py description = Building Python module rule build_ocaml - command = cd src ; python create_ocaml.py + command = cd src ; python2 create_ocaml.py description = Building Ocaml module build {irpf90_files}: compile_irpf90 | {irpf90_sources} {CONFIG_FILES} From cb19345ed9e57579d3e145f2415fd731c0ef66a0 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 30 Apr 2018 20:00:00 +0200 Subject: [PATCH 4/4] Python2 --- configure.py | 3 ++- src/Makefile | 4 ++-- src/libezfio_file.irp.f | 4 ++-- src/libezfio_groups.irp.f | 2 +- src/libezfio_util.irp.f | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.py b/configure.py index cdedd88..7fba0c1 100755 --- a/configure.py +++ b/configure.py @@ -26,7 +26,8 @@ d_default = { "FCFLAGS" : '-O2', "RANLIB" : 'ranlib', "AR" : 'ar', - "BUILD_SYSTEM" : 'make' + "BUILD_SYSTEM" : 'make', + "NINJA" : 'ninja', } CONFIG_FILES=' '.join([ os.path.join("config",x) for x in os.listdir('config') if x != '.empty']) diff --git a/src/Makefile b/src/Makefile index 66cdeb5..c5bb04e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,10 +52,10 @@ static: ../lib/libezfio.a ../lib/libezfio_irp.a cp ../lib/libezfio.a ../lib/libezfio_irp.a ../Python/ezfio.py: ../lib/libezfio.a - python create_python.py + python2 create_python.py ../Ocaml/ezfio.ml: ../lib/libezfio.a - python create_ocaml.py + python2 create_ocaml.py IRPF90_temp/irpf90.a: $(BUILD_FILE) $(call run_and_touch, $<, $@) diff --git a/src/libezfio_file.irp.f b/src/libezfio_file.irp.f index 9334a2a..a9384ce 100644 --- a/src/libezfio_file.irp.f +++ b/src/libezfio_file.irp.f @@ -159,7 +159,7 @@ subroutine ezfio_set_file(filename_in) call ezfio_mkdir(trim(libezfio_filename)//'/ezfio') call system('LANG= date > '//trim(libezfio_filename)//'/ezfio/creation') call system('echo $USER > '//trim(libezfio_filename)//'/ezfio/user') - BEGIN_SHELL [ /usr/bin/python ] + BEGIN_SHELL [ /usr/bin/env python2 ] import os command = "'echo %s > '//trim(libezfio_filename)//'/ezfio/library'" cwd = os.getcwd() @@ -178,7 +178,7 @@ subroutine ezfio_finish() ! Close all open buffers END_DOC close(libezfio_iunit) - BEGIN_SHELL [ /usr/bin/python ] + BEGIN_SHELL [ /usr/bin/env python2 ] import os from zlib import crc32 print ' call irp_finalize_%s'%(str(abs(crc32(os.getcwd())))) diff --git a/src/libezfio_groups.irp.f b/src/libezfio_groups.irp.f index 8b1d991..9bcc9ab 100644 --- a/src/libezfio_groups.irp.f +++ b/src/libezfio_groups.irp.f @@ -22,7 +22,7 @@ ! 31062 Toulouse Cedex 4 ! scemama@irsamc.ups-tlse.fr -BEGIN_SHELL [ /usr/bin/python ] +BEGIN_SHELL [ /usr/bin/env python2 ] import groups END_SHELL diff --git a/src/libezfio_util.irp.f b/src/libezfio_util.irp.f index 1ab88b4..b7a0c6f 100644 --- a/src/libezfio_util.irp.f +++ b/src/libezfio_util.irp.f @@ -114,7 +114,7 @@ subroutine libezfio_closez(filename,mode) end -BEGIN_SHELL [ /usr/bin/python ] +BEGIN_SHELL [ /usr/bin/env python2 ] from f_types import format, t_short