arvados-cli 0.1.20151117034231 → 0.1.20151118230027

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/crunch-job +18 -10
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39e52085fe5a0ef6fc6ed0857443a5e1c6453711
4
- data.tar.gz: 5acad63069d81197322b7e390d4b0e4d756881a4
3
+ metadata.gz: 993e2394a764ef0fda3c46cfad7c73bef8a386c6
4
+ data.tar.gz: cedebc3a757baab5c83a81471fc4cebc1058acb3
5
5
  SHA512:
6
- metadata.gz: a3085bf60663bb8d19110376b4d7a88653d52e9df4b2781dd8ee9a929e1cfbc110a33ba1f884ba874c535a8527c845cf1aef147b668f229d098b323fce4a601a
7
- data.tar.gz: b9ae59d181a1bdd4603aa0ff20f12fb9415d26fc8625f370b0e400dfe943a4098e59fb34b5137f129519f2c4fad0b9c9fdc1619a233dfca22ef8c7fdecdb780d
6
+ metadata.gz: e731dda19cd33c64f07a4b22176101ef2c2235c896b68d7a82633bee7ceaa60d5798bed5e3de46a5f542fb2f23376312f84e8b13a38a551d5143162ec799dd29
7
+ data.tar.gz: d623f94305db653df8077968a853caaf25df93daee17af95984bf9b4c5acb72de03e71489fb50e80492741627285c57d95607c560e7707d49613ab55b177873b
data/bin/crunch-job CHANGED
@@ -965,7 +965,10 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
965
965
  $command .= $stdbuf;
966
966
  $command .= "perl - \Q$ENV{CRUNCH_SRC}/crunch_scripts/$Job->{script}\E";
967
967
  } else {
968
- $command .= "/bin/sh -c \'mkdir -p \"$ENV{JOB_WORK}\" \"$ENV{TASK_WORK}\" && " .
968
+ $command .= "/bin/sh -c \'python -c " .
969
+ '"from pkg_resources import get_distribution as get; print \"Using Arvados SDK version\", get(\"arvados-python-client\").version"' .
970
+ ">&2 2>/dev/null; " .
971
+ "mkdir -p \"$ENV{JOB_WORK}\" \"$ENV{TASK_WORK}\" && " .
969
972
  "if which stdbuf >/dev/null ; then " .
970
973
  " exec $stdbuf \Q$ENV{CRUNCH_SRC}/crunch_scripts/$Job->{script}\E ;" .
971
974
  " else " .
@@ -2169,10 +2172,11 @@ if (@ARGV) {
2169
2172
  $Log->("Built Python SDK virtualenv");
2170
2173
  }
2171
2174
 
2172
- my $pip_bin = "pip";
2175
+ my @pysdk_version_cmd = ("python", "-c",
2176
+ "from pkg_resources import get_distribution as get; print get('arvados-python-client').version");
2173
2177
  if ($venv_built) {
2174
2178
  $Log->("Running in Python SDK virtualenv");
2175
- $pip_bin = "$venv_dir/bin/pip";
2179
+ @pysdk_version_cmd = ();
2176
2180
  my $orig_argv = join(" ", map { quotemeta($_); } @ARGV);
2177
2181
  @ARGV = ("/bin/sh", "-ec",
2178
2182
  ". \Q$venv_dir/bin/activate\E; exec $orig_argv");
@@ -2181,14 +2185,18 @@ if (@ARGV) {
2181
2185
  "\$PATH. Can't install Python SDK.");
2182
2186
  }
2183
2187
 
2184
- my $pkgs = `(\Q$pip_bin\E freeze 2>/dev/null | grep arvados) || dpkg-query --show '*arvados*'`;
2185
- if ($pkgs) {
2186
- $Log->("Using Arvados SDK:");
2187
- foreach my $line (split /\n/, $pkgs) {
2188
- $Log->($line);
2188
+ if (@pysdk_version_cmd) {
2189
+ open(my $pysdk_version_pipe, "-|", @pysdk_version_cmd);
2190
+ my $pysdk_version = <$pysdk_version_pipe>;
2191
+ close($pysdk_version_pipe);
2192
+ if ($? == 0) {
2193
+ chomp($pysdk_version);
2194
+ $Log->("Using Arvados SDK version $pysdk_version");
2195
+ } else {
2196
+ # A lot could've gone wrong here, but pretty much all of it means that
2197
+ # Python won't be able to load the Arvados SDK.
2198
+ $Log->("Warning: Arvados SDK not found");
2189
2199
  }
2190
- } else {
2191
- $Log->("Arvados SDK packages not found");
2192
2200
  }
2193
2201
 
2194
2202
  while (my ($sdk_dir, $sdk_envkey) = each(%SDK_ENVVARS)) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20151117034231
4
+ version: 0.1.20151118230027
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arvados
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - "<"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.0.0
181
- description: Arvados command line tools, git commit 714c555bda26a6a27fad7caef382d1d6705ad215
181
+ description: Arvados command line tools, git commit 155b1aa3772eb2d9421c5bfc678320401eb3b058
182
182
  email: gem-dev@curoverse.com
183
183
  executables:
184
184
  - arv