[ARVADOS] updated: 2abf7fca110acf699645f45025b62608d287bdd4
git at public.curoverse.com
git at public.curoverse.com
Fri Feb 28 18:29:48 EST 2014
Summary of changes:
sdk/cli/bin/crunch-job | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
via 2abf7fca110acf699645f45025b62608d287bdd4 (commit)
from 06362e4d206c4765567e0a6b5585197ce0c9d30f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2abf7fca110acf699645f45025b62608d287bdd4
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Feb 28 15:28:55 2014 -0800
Set up virtualenv and install custom SDK only if SDK appears in
arvados/sdk/python -- ignore sdk/python.
This means scripts that are run straight from the arvados tree will
use whatever SDK is installed on the compute node, rather than
installing the SDK and dependencies into a virtualenv.
If you want your scripts to be in [a fork of] the arvados tree rather
than bringing in arvados as a submodule, *and* you want to pin jobs to
a specific SDK version, add a symbolic link in your source tree
(/arvados -> .).
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index fec23d4..2ba36f2 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -332,11 +332,10 @@ my $skip_install = ($local_job && $Job->{script_version} =~ m{^/});
if ($skip_install)
{
$ENV{"CRUNCH_SRC"} = $Job->{script_version};
- system("virtualenv", "$ENV{CRUNCH_TMP}/opt") == 0
- or croak ("virtualenv $ENV{CRUNCH_TMP}/opt failed: exit ".($?>>8));
- for my $src_path ("$ENV{CRUNCH_SRC}/arvados/sdk/python",
- "$ENV{CRUNCH_SRC}/sdk/python") {
+ for my $src_path ("$ENV{CRUNCH_SRC}/arvados/sdk/python") {
if (-d $src_path) {
+ system("virtualenv", "$ENV{CRUNCH_TMP}/opt") == 0
+ or croak ("virtualenv $ENV{CRUNCH_TMP}/opt failed: exit ".($?>>8));
system ("cd $src_path && ./build.sh && \$CRUNCH_TMP/opt/bin/python setup.py install")
== 0
or croak ("setup.py in $src_path failed: exit ".($?>>8));
@@ -1387,9 +1386,9 @@ chomp ($pwd = `pwd`);
my $install_dir = $ENV{"CRUNCH_INSTALL"} || "$pwd/opt";
mkdir $install_dir;
-shell_or_die ("virtualenv", $install_dir);
-for my $src_path ("$destdir/arvados/sdk/python", "$destdir/sdk/python") {
+for my $src_path ("$destdir/arvados/sdk/python") {
if (-d $src_path) {
+ shell_or_die ("virtualenv", $install_dir);
shell_or_die ("cd $src_path && ./build.sh && $install_dir/bin/python setup.py install");
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list