From 9cc552409fd4c94e3668cae95e58d4220b6e016a Mon Sep 17 00:00:00 2001 From: q-posev Date: Wed, 18 Aug 2021 13:30:03 +0300 Subject: [PATCH] rename the front-end Python module --- src/templates_front/build.sh | 4 ++-- tools/prepare_python.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/templates_front/build.sh b/src/templates_front/build.sh index 5853c27..aa0d114 100644 --- a/src/templates_front/build.sh +++ b/src/templates_front/build.sh @@ -10,7 +10,7 @@ echo "" >> trexio.h cat prefix_s_front.h > trexio_s.h cat prefix_fortran.f90 > trexio_f.f90 -cat prefix_python.py > trexio.py +cat prefix_python.py > trexio_api.py # c front end cat populated/pop_*.c >> trexio.c @@ -23,7 +23,7 @@ cat helper_fortran.f90 >> trexio_f.f90 cat populated/pop_*.fh_90 >> trexio_f.f90 # python front end -cat populated/pop_*.py >> trexio.py +cat populated/pop_*.py >> trexio_api.py # suffixes cat suffix_s_front.h >> trexio_s.h diff --git a/tools/prepare_python.sh b/tools/prepare_python.sh index 0e66a6c..7224e2b 100755 --- a/tools/prepare_python.sh +++ b/tools/prepare_python.sh @@ -13,15 +13,18 @@ readonly SRC=${TREXIO_ROOT}/src readonly INCLUDIR=${TREXIO_ROOT}/include readonly TOOLS=${TREXIO_ROOT}/tools readonly PYDIR=${TREXIO_ROOT}/python +readonly PYTREXIODIR=${PYDIR}/trexio # We want the script to crash on the 1st error: set -e -# Create src directory in the python folder if not yet done +# Create src and trexio directories in the python folder if not yet done mkdir -p ${PYDIR}/src +mkdir -p ${PYTREXIODIR} # Copy all the source code and header files in the corresponding python directory -cp ${SRC}/*.py ${PYDIR} +mv ${SRC}/pytrexio.py ${PYTREXIODIR} +mv ${SRC}/trexio_api.py ${PYTREXIODIR} cp ${SRC}/*.c ${PYDIR}/src cp ${SRC}/*.h ${PYDIR}/src cp ${INCLUDIR}/trexio.h ${PYDIR}/src