Changes to src/install.sh to allow installation under Mac OSX

In phagen_scf.f, subroutine atom_sub: changed dimensions of r_hs, rho0_hs to be assumed size arrays
This commit is contained in:
Kevin Dunseath 2019-11-27 16:03:49 +01:00
parent 4a5f6f1161
commit 1e67616733
2 changed files with 291 additions and 288 deletions

View File

@ -69,7 +69,8 @@ error_exit () {
printf " for more informations.\n"
printf " Below is an excerpt of the last 10 lines:\n"
printf "\n"
tail -v -n 10 "${LOGFILE}"
# tail -v -n 10 "${LOGFILE}"
tail -n 10 "${LOGFILE}"
# uninstall if needed
pip uninstall -y msspec
@ -91,7 +92,7 @@ get_os () {
break
fi
done
}
@ -105,7 +106,7 @@ read_yes_no () {
VALID=1
while test $VALID -ne 0; do
printf "${PROMPT}"
if [ x"$BYPASS" = "xn" ]; then
if [ x"$BYPASS" = "xn" ]; then
read "RESPONSE"
else
printf "\n"
@ -128,7 +129,7 @@ read_folder () {
ANSWER=""
unset FOLDER
printf "${PROMPT}"
if [ x"$BYPASS" = "xn" ]; then
if [ x"$BYPASS" = "xn" ]; then
read "ANSWER"
else
printf "\n"
@ -170,7 +171,7 @@ wrap () {
if [ "$DEBUG" = "y" ]; then
eval "($1) 2>&1" | tee -a ${LOGFILE}
echo ${PIPESTATUS[0]} >${GETOUTFILE}
rc=$(cat $GETOUTFILE)
if [ $rc != 0 ]; then
error_exit
@ -194,7 +195,7 @@ update_path () {
${ECHO} ""
${ECHO} "Please source again your shell configuration file by typing:"
${ECHO} "source $SHELLRC"
fi
fi
}
@ -230,7 +231,7 @@ patience () {
${ECHO} "\b\b Done."
}
show_help () {
show_help () {
echo "Usage: $SCRIPT_NAME [OPTIONS]"
echo "List of possible options:"
echo " -p FOLDER Default FOLDER for installation."
@ -252,7 +253,8 @@ check_dependencies () {
gcc_ver_min=7
log_message "Checking if gfortran >= $gcc_ver_min is installed..."
command -V gfortran || return 1
gcc_ver=$(gcc -dumpversion)
# gcc_ver=$(gcc -dumpversion)
gcc_ver=$(echo $(gcc -dumpversion)| cut -d. -f1)
echo "You have gfortran version $gcc_ver installed"
test $gcc_ver -ge $gcc_ver_min || return 1
log_message "Ok\n"
@ -278,9 +280,9 @@ check_dependencies () {
# we need virtualenv
log_message "Checking if virtualenv is installed..."
command -V virtualenv || return 1
#command -V virtualenv || return 1
log_message "Ok\n"
}
local_install () {
@ -322,7 +324,7 @@ local_install () {
y) # Create the destination folder
read_folder "Please, type in the base installation folder" "${DEFAULT_DEST}"
DEST_FOLDER=${FOLDER}/MsSpec-${VERSION}
if [ -d $DEST_FOLDER ]; then
if [ -d $DEST_FOLDER ]; then
export DEST_ALREADY_EXISTS="y" # to avoid cleaning the existing DEST_FOLDER in case of any problem
read_yes_no "The folder $DEST_FOLDER already exists. Overwrite" "y"
case ${ANSWER} in
@ -348,7 +350,7 @@ local_install () {
# build and run setuptools to create a source distribution
wrap "make sdist" \
"Building MsSpec python package"
# install the package with pip
wrap "pip install $pip_opt dist/msspec-*.tar.gz" \
"Installing pymsspec python package and its dependencies"
@ -377,7 +379,7 @@ local_install () {
if [ x"${ANSWER}" = "xn" ]; then
rm -f "${LOGFILE}"
fi
# self-explanatory
success_message
}

File diff suppressed because it is too large Load Diff