[ARVADOS] updated: a70a555fbd30524568a0e019df184468f28556f0

Git user git at public.curoverse.com
Fri Oct 21 09:54:08 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/arvdocker.py |  5 ++++-
 sdk/cwl/setup.py                 | 12 ++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

       via  a70a555fbd30524568a0e019df184468f28556f0 (commit)
      from  e8e45c5267f216909382aad7fc976dca82008284 (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 a70a555fbd30524568a0e019df184468f28556f0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Oct 21 09:52:36 2016 -0400

    10194: Use SETUP_DIR for checking git version and writing _version.py.  Add
    comment about calling cwltool.docker.get_image(dockerRequirement, pull_image).

diff --git a/sdk/cwl/arvados_cwl/arvdocker.py b/sdk/cwl/arvados_cwl/arvdocker.py
index 3e5414f..244dd3d 100644
--- a/sdk/cwl/arvados_cwl/arvdocker.py
+++ b/sdk/cwl/arvados_cwl/arvdocker.py
@@ -23,7 +23,10 @@ def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
                                                             image_tag=image_tag)
 
     if not images:
-        imageId = cwltool.docker.get_image(dockerRequirement, pull_image)
+        # Fetch Docker image if necessary.
+        cwltool.docker.get_image(dockerRequirement, pull_image)
+
+        # Upload image to Arvados
         args = ["--project-uuid="+project_uuid, image_name]
         if image_tag:
             args.append(image_tag)
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 5caa5c8..4adcac4 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,15 +16,19 @@ try:
 except ImportError:
     tagger = egg_info_cmd.egg_info
 
+versionfile = os.path.join(SETUP_DIR, "arvados_cwl/_version.py")
 try:
     gitinfo = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
-         '--format=format:%H']).strip()
-    with open("arvados_cwl/_version.py", "w") as f:
+         '--format=format:%H', SETUP_DIR]).strip()
+    with open(versionfile, "w") as f:
         f.write("__version__ = '%s'\n" % gitinfo)
 except Exception as e:
-    print(e)
-    pass
+    # When installing from package, it won't be part of a git repository, and
+    # check_output() will raise an exception.  But the package should include the
+    # version file, so we can proceed.
+    if not os.path.exists(versionfile):
+        raise
 
 setup(name='arvados-cwl-runner',
       version='1.0',

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list