diff --git a/Makefile b/Makefile index 5ac6182..e574683 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,12 @@ include make.config default: make.config 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 @@ -44,7 +46,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/bin/archive_ezfio.py b/bin/archive_ezfio.py index 82a5140..5b8f1e3 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/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 86e8773..d89c155 100755 --- a/configure.py +++ b/configure.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os,sys @@ -26,6 +26,7 @@ d_default = { "FCFLAGS" : '-O2', "RANLIB" : 'ranlib', "AR" : 'ar', + "BUILD_SYSTEM" : 'make', "NINJA" : 'ninja', } @@ -116,11 +117,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} diff --git a/src/Makefile b/src/Makefile index 91f9ae6..40507f6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -51,10 +51,11 @@ static: ../lib/libezfio.a ../lib/libezfio_irp.a $(AR) dv ../lib/libezfio_irp.a irp_stack.irp.o $(RANLIB) ../lib/libezfio_irp.a -../Python/ezfio.py: - python create_python.py -../Ocaml/ezfio.ml: - python create_ocaml.py +../Python/ezfio.py: ../lib/libezfio.a + python2 create_python.py + +../Ocaml/ezfio.ml: ../lib/libezfio.a + python2 create_ocaml.py 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 83dd175..89a326d 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 4e14c24..ea4b049 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/libezfio_file.irp.f b/src/libezfio_file.irp.f index 860eb8e..41f0bed 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 3a3a573..ae354f2 100644 --- a/src/libezfio_util.irp.f +++ b/src/libezfio_util.irp.f @@ -111,7 +111,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 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 # diff --git a/version b/version index f406e04..0c794cf 100644 --- a/version +++ b/version @@ -1 +1 @@ -VERSION=1.3.1 +VERSION=1.3.2