10497: Update cwltool & schema salad versions.
[arvados.git] / sdk / cwl / setup.py
index 31841df42060d70235cac1ced4c38a38342d8364..8c338863e1063f9e65c6a1bbe8caa7e49cd7932d 100644 (file)
@@ -2,6 +2,7 @@
 
 import os
 import sys
+import subprocess
 import setuptools.command.egg_info as egg_info_cmd
 
 from setuptools import setup, find_packages
@@ -15,6 +16,20 @@ 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', gittaggers.choose_version_from()]).strip()
+    with open(versionfile, "w") as f:
+        f.write("__version__ = '%s'\n" % gitinfo)
+except Exception as e:
+    # 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',
       description='Arvados Common Workflow Language runner',
@@ -25,15 +40,18 @@ setup(name='arvados-cwl-runner',
       download_url="https://github.com/curoverse/arvados.git",
       license='Apache 2.0',
       packages=find_packages(),
+      package_data={'arvados_cwl': ['arv-cwl-schema.yml']},
       scripts=[
           'bin/cwl-runner',
           'bin/arvados-cwl-runner'
       ],
-      # Make sure to update arvados/build/run-build-packages.sh as well
-      # when updating the cwltool version pin.
+      # Note that arvados/build/run-build-packages.sh looks at this
+      # file to determine what version of cwltool and schema-salad to build.
       install_requires=[
-          'cwltool==1.0.20160923180109',
-          'arvados-python-client>=0.1.20160826210445'
+          'cwltool==1.0.20161216212910',
+          'schema-salad==2.1.20161216210732',
+          'arvados-python-client>=0.1.20160826210445',
+          'setuptools'
       ],
       data_files=[
           ('share/doc/arvados-cwl-runner', ['LICENSE-2.0.txt', 'README.rst']),