[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri May 19 14:07:05 PDT 2017
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/0bc2031ae008/
Changeset: 0bc2031ae008
User: ngoldbaum
Date: 2017-05-18 00:03:05+00:00
Summary: fix YT_DIR and INST_GIT semantics. closes #1401
Affected #: 1 file
diff -r 31f9175e8d8bce23bc870fd6c092011e2acf3964 -r 0bc2031ae0083457a41cdf127a01aa9fe0344cc5 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -1072,7 +1072,7 @@
# Install setuptools
do_setup_py $SETUPTOOLS
- if type -p git &>/dev/null
+ if type -P git &>/dev/null
then
GIT_EXE="git"
else
@@ -1087,7 +1087,7 @@
YT_DIR="$ORIG_PWD"
elif [ -e $ORIG_PWD/../yt/mods.py ]
then
- YT_DIR=`dirname $ORIG_PWD`
+ YT_DIR=$(dirname $ORIG_PWD)
elif [ ! -e yt-git ]
then
echo "Cloning yt"
@@ -1420,8 +1420,19 @@
fi
log_cmd ${DEST_DIR}/bin/conda update --yes conda
-
- GIT_EXE=${DEST_DIR}/bin/git
+
+ if [ $INST_GIT -eq 1 ]
+ then
+ GIT_EXE=${DEST_DIR}/bin/git
+ else
+ if type -P git &>/dev/null
+ then
+ GIT_EXE="git"
+ else
+ echo "Cannot find git. Please install git or set INST_GIT=1."
+ do_exit
+ fi
+ fi
log_cmd echo "DEPENDENCIES" ${YT_DEPS[@]}
for YT_DEP in "${YT_DEPS[@]}"; do
@@ -1494,9 +1505,27 @@
log_cmd ${DEST_DIR}/bin/conda install -c conda-forge --yes yt
else
echo "Building yt from source"
- YT_DIR="${DEST_DIR}/src/yt-git"
- log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt ${YT_DIR}
- log_cmd ${GIT_EXE} -C ${YT_DIR} checkout ${BRANCH}
+ if [ -z "$YT_DIR" ]
+ then
+ if [ -e $ORIG_PWD/yt/mods.py ]
+ then
+ YT_DIR="$ORIG_PWD"
+ elif [ -e $ORIG_PWD/../yt/mods.py ]
+ then
+ YT_DIR=$(dirname $ORIG_PWD)
+ else
+ YT_DIR="${DEST_DIR}/src/yt-git"
+ log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt ${YT_DIR}
+ log_cmd ${GIT_EXE} -C ${YT_DIR} checkout ${BRANCH}
+ fi
+ echo Setting YT_DIR=${YT_DIR}
+ else
+ if [ ! -e $YT_DIR/.git ]
+ then
+ echo "$YT_DIR is not a clone of the yt git repository, exiting"
+ do_exit
+ fi
+ fi
if [ $INST_EMBREE -eq 1 ]
then
echo $DEST_DIR > ${YT_DIR}/embree.cfg
https://bitbucket.org/yt_analysis/yt/commits/9038d396c698/
Changeset: 9038d396c698
User: ngoldbaum
Date: 2017-05-19 21:06:45+00:00
Summary: Merge pull request #1402 from ngoldbaum/install-script-fixes
Fix YT_DIR and INST_GIT semantics.
Affected #: 1 file
diff -r 2c99a58e7aed85ec4948345fefb6cb39e392aaf9 -r 9038d396c6989cc82060470c19b077538c553921 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -1072,7 +1072,7 @@
# Install setuptools
do_setup_py $SETUPTOOLS
- if type -p git &>/dev/null
+ if type -P git &>/dev/null
then
GIT_EXE="git"
else
@@ -1087,7 +1087,7 @@
YT_DIR="$ORIG_PWD"
elif [ -e $ORIG_PWD/../yt/mods.py ]
then
- YT_DIR=`dirname $ORIG_PWD`
+ YT_DIR=$(dirname $ORIG_PWD)
elif [ ! -e yt-git ]
then
echo "Cloning yt"
@@ -1420,8 +1420,19 @@
fi
log_cmd ${DEST_DIR}/bin/conda update --yes conda
-
- GIT_EXE=${DEST_DIR}/bin/git
+
+ if [ $INST_GIT -eq 1 ]
+ then
+ GIT_EXE=${DEST_DIR}/bin/git
+ else
+ if type -P git &>/dev/null
+ then
+ GIT_EXE="git"
+ else
+ echo "Cannot find git. Please install git or set INST_GIT=1."
+ do_exit
+ fi
+ fi
log_cmd echo "DEPENDENCIES" ${YT_DEPS[@]}
for YT_DEP in "${YT_DEPS[@]}"; do
@@ -1494,9 +1505,27 @@
log_cmd ${DEST_DIR}/bin/conda install -c conda-forge --yes yt
else
echo "Building yt from source"
- YT_DIR="${DEST_DIR}/src/yt-git"
- log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt ${YT_DIR}
- log_cmd ${GIT_EXE} -C ${YT_DIR} checkout ${BRANCH}
+ if [ -z "$YT_DIR" ]
+ then
+ if [ -e $ORIG_PWD/yt/mods.py ]
+ then
+ YT_DIR="$ORIG_PWD"
+ elif [ -e $ORIG_PWD/../yt/mods.py ]
+ then
+ YT_DIR=$(dirname $ORIG_PWD)
+ else
+ YT_DIR="${DEST_DIR}/src/yt-git"
+ log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt ${YT_DIR}
+ log_cmd ${GIT_EXE} -C ${YT_DIR} checkout ${BRANCH}
+ fi
+ echo Setting YT_DIR=${YT_DIR}
+ else
+ if [ ! -e $YT_DIR/.git ]
+ then
+ echo "$YT_DIR is not a clone of the yt git repository, exiting"
+ do_exit
+ fi
+ fi
if [ $INST_EMBREE -eq 1 ]
then
echo $DEST_DIR > ${YT_DIR}/embree.cfg
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list