Skip to content

Commit

Permalink
Merge pull request #150 from wistaria/pip_ubuntu22
Browse files Browse the repository at this point in the history
make pip install compatible with Ubuntu 22.04
  • Loading branch information
yomichi authored Mar 22, 2024
2 parents d7425fc + d656de9 commit 678cf40
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 8 deletions.
5 changes: 5 additions & 0 deletions apps/dcore/config/default/install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
python3 -m pip install --prefix=$PREFIX ./

if [ -d ${PREFIX}/local ]; then
PREFIX=${PREFIX}/local
fi

cp -r examples $PREFIX
4 changes: 4 additions & 0 deletions apps/dcore/config/default/postprocess.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 11 additions & 1 deletion apps/dcore/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/dcore/version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DCORE_VERSION="3.3.1"
DCORE_MA_REVISION="1"
DCORE_MA_REVISION="2"

__NAME__=dcore
__VERSION__=${DCORE_VERSION}
Expand Down
5 changes: 5 additions & 0 deletions apps/hwave/config/default/install.sh
Original file line number Diff line number Diff line change
@@ -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/
4 changes: 4 additions & 0 deletions apps/hwave/config/default/postprocess.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 11 additions & 1 deletion apps/hwave/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/hwave/version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HWAVE_VERSION="1.0.0"
HWAVE_MA_REVISION="1"
HWAVE_MA_REVISION="2"

__NAME__=hwave
__VERSION__=${HWAVE_VERSION}
Expand Down
3 changes: 3 additions & 0 deletions apps/lammps/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions apps/physbo/config/default/install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
python3 -m pip install --prefix=$PREFIX ./

if [ -d ${PREFIX}/local ]; then
PREFIX=${PREFIX}/local
fi

cp -r examples $PREFIX
12 changes: 11 additions & 1 deletion apps/physbo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/physbo/version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PHYSBO_VERSION="1.0.1"
PHYSBO_MA_REVISION="1"
PHYSBO_MA_REVISION="2"

__NAME__=physbo
__VERSION__=${PHYSBO_VERSION}
Expand Down
5 changes: 5 additions & 0 deletions apps/py2dmat/config/default/install.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions apps/py2dmat/config/default/postprocess.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 11 additions & 1 deletion apps/py2dmat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/py2dmat/version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PY2DMAT_VERSION="2.1.0"
PY2DMAT_MA_REVISION="1"
PY2DMAT_MA_REVISION="2"

__NAME__=py2dmat
__VERSION__=${PY2DMAT_VERSION}
Expand Down

0 comments on commit 678cf40

Please sign in to comment.