diff --git a/apps/dcore/config/default/install.sh b/apps/dcore/config/default/install.sh index 2105e2c6..e96759b9 100644 --- a/apps/dcore/config/default/install.sh +++ b/apps/dcore/config/default/install.sh @@ -1,2 +1,7 @@ python3 -m pip install --prefix=$PREFIX ./ + +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cp -r examples $PREFIX diff --git a/apps/dcore/config/default/postprocess.sh b/apps/dcore/config/default/postprocess.sh index 528ee737..d5c8fad4 100644 --- a/apps/dcore/config/default/postprocess.sh +++ b/apps/dcore/config/default/postprocess.sh @@ -1,5 +1,9 @@ if [ -x $ISSP_UCOUNT ]; then +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cd ${PREFIX}/bin for file in dcore dcore_bse; do mv ${file} ${file}_nocount diff --git a/apps/dcore/install.sh b/apps/dcore/install.sh index 05852050..09a0386d 100644 --- a/apps/dcore/install.sh +++ b/apps/dcore/install.sh @@ -70,13 +70,23 @@ PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d. -f1,2) ROOTNAME=$(toupper ${__NAME__})_ROOT +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + +if [ -d ${PREFIX}/lib/python${PYTHON_VERSION}/dist-packages ]; then + SITE_PACKAGES=dist-packages +else + SITE_PACKAGES=site-packages +fi + cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh # ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) . ${MA_ROOT}/env.sh . ${MA_ROOT}/triqs/triqsvars.sh export ${ROOTNAME}=$PREFIX export PATH=\${${ROOTNAME}}/bin:\$PATH -export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/site-packages:\$PYTHONPATH +export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/${SITE_PACKAGES}:\$PYTHONPATH EOF VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh rm -f $VARS_SH diff --git a/apps/dcore/version.sh b/apps/dcore/version.sh index a159fda7..334f226d 100644 --- a/apps/dcore/version.sh +++ b/apps/dcore/version.sh @@ -1,5 +1,5 @@ DCORE_VERSION="3.3.1" -DCORE_MA_REVISION="1" +DCORE_MA_REVISION="2" __NAME__=dcore __VERSION__=${DCORE_VERSION} diff --git a/apps/hwave/config/default/install.sh b/apps/hwave/config/default/install.sh index a250fbb4..d77dc3fd 100644 --- a/apps/hwave/config/default/install.sh +++ b/apps/hwave/config/default/install.sh @@ -1,2 +1,7 @@ python3 -m pip install --prefix=$PREFIX ./ + +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cp -r hwave-gallery-main/samples $PREFIX/ diff --git a/apps/hwave/config/default/postprocess.sh b/apps/hwave/config/default/postprocess.sh index 0546dfb3..c24fe9ca 100644 --- a/apps/hwave/config/default/postprocess.sh +++ b/apps/hwave/config/default/postprocess.sh @@ -1,5 +1,9 @@ if [ -x $ISSP_UCOUNT ]; then +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cd ${PREFIX}/bin for file in hwave; do mv ${file} ${file}_nocount diff --git a/apps/hwave/install.sh b/apps/hwave/install.sh index fc3f9b7c..252426c3 100644 --- a/apps/hwave/install.sh +++ b/apps/hwave/install.sh @@ -62,12 +62,22 @@ PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d. -f1,2) ROOTNAME=$(toupper ${__NAME__})_ROOT +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + +if [ -d ${PREFIX}/lib/python${PYTHON_VERSION}/dist-packages ]; then + SITE_PACKAGES=dist-packages +else + SITE_PACKAGES=site-packages +fi + cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh # ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) . ${MA_ROOT}/env.sh export ${ROOTNAME}=$PREFIX export PATH=\${${ROOTNAME}}/bin:\$PATH -export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/site-packages:\$PYTHONPATH +export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/${SITE_PACKAGES}:\$PYTHONPATH EOF VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh rm -f $VARS_SH diff --git a/apps/hwave/version.sh b/apps/hwave/version.sh index 395a0061..318faaee 100644 --- a/apps/hwave/version.sh +++ b/apps/hwave/version.sh @@ -1,5 +1,5 @@ HWAVE_VERSION="1.0.0" -HWAVE_MA_REVISION="1" +HWAVE_MA_REVISION="2" __NAME__=hwave __VERSION__=${HWAVE_VERSION} diff --git a/apps/lammps/install.sh b/apps/lammps/install.sh index 134856d2..ff55cdf8 100644 --- a/apps/lammps/install.sh +++ b/apps/lammps/install.sh @@ -65,6 +65,9 @@ finish_info | tee -a $LOG ROOTNAME=$(toupper ${__NAME__})_ROOT PPATH=$(cd $PREFIX; find lib -name 'site-packages') +if [ -z ${PPATH} ]; then + PPATH=$(cd $PREFIX; find lib -name 'dist-packages') +fi cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh # ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) diff --git a/apps/physbo/config/default/install.sh b/apps/physbo/config/default/install.sh index 2105e2c6..e96759b9 100644 --- a/apps/physbo/config/default/install.sh +++ b/apps/physbo/config/default/install.sh @@ -1,2 +1,7 @@ python3 -m pip install --prefix=$PREFIX ./ + +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cp -r examples $PREFIX diff --git a/apps/physbo/install.sh b/apps/physbo/install.sh index cdbfbed7..7e19577a 100644 --- a/apps/physbo/install.sh +++ b/apps/physbo/install.sh @@ -67,12 +67,22 @@ PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d. -f1,2) ROOTNAME=$(toupper ${__NAME__})_ROOT +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + +if [ -d ${PREFIX}/lib/python${PYTHON_VERSION}/dist-packages ]; then + SITE_PACKAGES=dist-packages +else + SITE_PACKAGES=site-packages +fi + cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh # ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) . ${MA_ROOT}/env.sh export ${ROOTNAME}=$PREFIX export PATH=\${${ROOTNAME}}/bin:\$PATH -export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/site-packages:\$PYTHONPATH +export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/${SITE_PACKAGES}:\$PYTHONPATH EOF VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh rm -f $VARS_SH diff --git a/apps/physbo/version.sh b/apps/physbo/version.sh index 50914590..19ec608e 100644 --- a/apps/physbo/version.sh +++ b/apps/physbo/version.sh @@ -1,5 +1,5 @@ PHYSBO_VERSION="1.0.1" -PHYSBO_MA_REVISION="1" +PHYSBO_MA_REVISION="2" __NAME__=physbo __VERSION__=${PHYSBO_VERSION} diff --git a/apps/py2dmat/config/default/install.sh b/apps/py2dmat/config/default/install.sh index 3f7671ad..53e4a31b 100644 --- a/apps/py2dmat/config/default/install.sh +++ b/apps/py2dmat/config/default/install.sh @@ -1,3 +1,8 @@ python3 -m pip install --prefix=$PREFIX ./ + +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cp -r sample $PREFIX cp -r script $PREFIX diff --git a/apps/py2dmat/config/default/postprocess.sh b/apps/py2dmat/config/default/postprocess.sh index 7918894d..6e0f0597 100644 --- a/apps/py2dmat/config/default/postprocess.sh +++ b/apps/py2dmat/config/default/postprocess.sh @@ -1,5 +1,9 @@ if [ -x $ISSP_UCOUNT ]; then +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + cd ${PREFIX}/bin for file in py2dmat; do mv ${file} ${file}_nocount diff --git a/apps/py2dmat/install.sh b/apps/py2dmat/install.sh index fc3f9b7c..252426c3 100644 --- a/apps/py2dmat/install.sh +++ b/apps/py2dmat/install.sh @@ -62,12 +62,22 @@ PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d. -f1,2) ROOTNAME=$(toupper ${__NAME__})_ROOT +if [ -d ${PREFIX}/local ]; then + PREFIX=${PREFIX}/local +fi + +if [ -d ${PREFIX}/lib/python${PYTHON_VERSION}/dist-packages ]; then + SITE_PACKAGES=dist-packages +else + SITE_PACKAGES=site-packages +fi + cat << EOF > ${BUILD_DIR}/${__NAME__}vars.sh # ${__NAME__} $(basename $0 .sh) ${__VERSION__} ${__MA_REVISION__} $(date +%Y%m%d-%H%M%S) . ${MA_ROOT}/env.sh export ${ROOTNAME}=$PREFIX export PATH=\${${ROOTNAME}}/bin:\$PATH -export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/site-packages:\$PYTHONPATH +export PYTHONPATH=\${${ROOTNAME}}/lib/python${PYTHON_VERSION}/${SITE_PACKAGES}:\$PYTHONPATH EOF VARS_SH=${MA_ROOT}/${__NAME__}/${__NAME__}vars-${__VERSION__}-${__MA_REVISION__}.sh rm -f $VARS_SH diff --git a/apps/py2dmat/version.sh b/apps/py2dmat/version.sh index 9691725e..1d718b7a 100644 --- a/apps/py2dmat/version.sh +++ b/apps/py2dmat/version.sh @@ -1,5 +1,5 @@ PY2DMAT_VERSION="2.1.0" -PY2DMAT_MA_REVISION="1" +PY2DMAT_MA_REVISION="2" __NAME__=py2dmat __VERSION__=${PY2DMAT_VERSION}