[yt-svn] commit/yt: 8 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Jan 22 07:50:40 PST 2013
8 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/f5fa0cd98696/
changeset: f5fa0cd98696
branch: yt
user: brittonsmith
date: 2013-01-06 03:59:45
summary: Added option to install script to install to currently set YT_DEST.
This is done by setting REINST_YT to 1.
affected #: 1 file
diff -r 554d144d9d248c6f70d8c665a5963aa39b2d6bb3 -r f5fa0cd9869602c9b0ca4b7a7c5503a855132abd doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -15,8 +15,13 @@
# And, feel free to drop me a line: matthewturk at gmail.com
#
-DEST_SUFFIX="yt-`uname -m`"
-DEST_DIR="`pwd`/${DEST_SUFFIX/ /}" # Installation location
+if [ ${REINST_YT} -eq 1 ] && [ -n ${YT_DEST} ]
+then
+ DEST_DIR=${YT_DEST}
+else
+ DEST_SUFFIX="yt-`uname -m`"
+ DEST_DIR="`pwd`/${DEST_SUFFIX/ /}" # Installation location
+fi
BRANCH="yt" # This is the branch to which we will forcibly update.
# Here's where you put the HDF5 path if you like; otherwise it'll download it
https://bitbucket.org/yt_analysis/yt/commits/288b124f9fd3/
changeset: 288b124f9fd3
branch: yt
user: brittonsmith
date: 2013-01-06 04:00:35
summary: Added --all option to yt update to run install script after updating
the yt repo.
affected #: 1 file
diff -r f5fa0cd9869602c9b0ca4b7a7c5503a855132abd -r 288b124f9fd3a404ab16ec07bfa552e4979a2e6b yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -108,6 +108,9 @@
namespace.pf = [_fix_pf(pf) for pf in pfs]
_common_options = dict(
+ all = dict(long="--all", dest="reinstall",
+ default=False, action="store_true",
+ help="Reinstall the full yt stack in the current location."),
pf = dict(short="pf", action=GetParameterFiles,
nargs="+", help="Parameter files to run on"),
opf = dict(action=GetParameterFiles, dest="pf",
@@ -296,6 +299,36 @@
)
+def _update_yt_stack(path):
+ "Rerun the install script to updated all dependencies."
+
+ install_script = os.path.join(path, "doc/install_script.sh")
+ if not os.path.exists(install_script):
+ print
+ print "Install script not found!"
+ print "The install script should be here: %s," % install_script
+ print "but it was not."
+ return
+
+ print
+ print "We will now attempt to update the yt stack located at:"
+ print " %s." % os.environ["YT_DEST"]
+ print
+ print "[hit enter to continue or Ctrl-C to stop]"
+ try:
+ raw_input()
+ except:
+ sys.exit(0)
+ os.environ["REINST_YT"] = "1"
+ ret = subprocess.call(["bash", install_script])
+ print
+ if ret:
+ print "The install script seems to have failed."
+ print "Check the output above."
+ else:
+ print "The yt stack has been updated successfully."
+ print "Now get back to work!"
+
def _update_hg(path, skip_rebuild = False):
from mercurial import hg, ui, commands
f = open(os.path.join(path, "yt_updater.log"), "a")
@@ -1546,6 +1579,7 @@
"%s (%0.5e years): %0.5e at %s\n" % (pf, t, v, c))
class YTUpdateCmd(YTCommand):
+ args = ("all", )
name = "update"
description = \
"""
@@ -1579,8 +1613,10 @@
print "---"
print
print "This installation CAN be automatically updated."
- update_hg(path)
+ update_hg(path, skip_rebuild=opts.reinstall)
print "Updated successfully."
+ if opts.reinstall:
+ _update_yt_stack(path)
else:
print
print "YT site-packages not in path, so you must"
https://bitbucket.org/yt_analysis/yt/commits/4ca41eb84424/
changeset: 4ca41eb84424
branch: yt
user: brittonsmith
date: 2013-01-06 04:43:15
summary: Added function to get the date of the last run of the install script.
affected #: 1 file
diff -r 288b124f9fd3a404ab16ec07bfa552e4979a2e6b -r 4ca41eb844244dafcc2b07396d8062eebac4711d yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -299,6 +299,17 @@
)
+def _get_yt_stack_date():
+ if "YT_DEST" not in os.environ:
+ print "Could not determine when yt stack was last updated."
+ return
+ date_file = os.path.join(os.environ["YT_DEST"], ".yt_update")
+ if not os.path.exists(date_file):
+ print "Could not determine when yt stack was last updated."
+ return
+ print "".join(file(date_file, 'r').readlines())
+ print "To update all dependencies, run \"yt update --all\"."
+
def _update_yt_stack(path):
"Rerun the install script to updated all dependencies."
@@ -1081,6 +1092,7 @@
if opts.update_source:
update_hg(path)
print "Updated successfully."
+ _get_yt_stack_date()
elif opts.update_source:
print
print "YT site-packages not in path, so you must"
@@ -1615,6 +1627,7 @@
print "This installation CAN be automatically updated."
update_hg(path, skip_rebuild=opts.reinstall)
print "Updated successfully."
+ _get_yt_stack_date()
if opts.reinstall:
_update_yt_stack(path)
else:
https://bitbucket.org/yt_analysis/yt/commits/20afaf09a329/
changeset: 20afaf09a329
branch: yt
user: brittonsmith
date: 2013-01-06 04:49:20
summary: Install script now writes the date to a .yt_update file so yt can tell
when it was last run.
affected #: 1 file
diff -r 4ca41eb844244dafcc2b07396d8062eebac4711d -r 20afaf09a329cbf875616bf621302f0455650c46 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -851,3 +851,6 @@
print_afterword
print_afterword >> ${LOG_FILE}
+
+echo "yt dependencies were last updated on" > ${YT_DEST}/.yt_update
+date >> ${YT_DEST}/.yt_update
https://bitbucket.org/yt_analysis/yt/commits/adf9f1bda2df/
changeset: adf9f1bda2df
branch: yt
user: brittonsmith
date: 2013-01-06 04:49:40
summary: Removing note about wxpython from install script.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/2167146f48d8/
changeset: 2167146f48d8
branch: yt
user: brittonsmith
date: 2013-01-06 04:52:19
summary: Moved setting of DEST_DIR to YT_DEST in install script to maintain
script readability.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/88b9ff31a9ae/
changeset: 88b9ff31a9ae
branch: yt
user: brittonsmith
date: 2013-01-06 04:57:19
summary: Fixing a tab so that instinfo doesn't print "updated successfully" if
update not done. I think I messed that up.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/bd00437516fa/
changeset: bd00437516fa
branch: yt
user: MatthewTurk
date: 2013-01-22 16:50:33
summary: Merged in brittonsmith/yt (pull request #391)
Adding yt update --all to update entired yt stack.
affected #: 2 files
Diff not available.
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