X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/196cb2e84834de79f25414de09a8d00bbe1a5eae..f5862345c56afa3ea3565db9e6e0edb365b9fa03:/sdk/cwl/setup.py diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py index d67b5ed47d..d517817574 100644 --- a/sdk/cwl/setup.py +++ b/sdk/cwl/setup.py @@ -3,36 +3,22 @@ # # SPDX-License-Identifier: Apache-2.0 +from __future__ import absolute_import import os import sys -import re from setuptools import setup, find_packages SETUP_DIR = os.path.dirname(__file__) or '.' README = os.path.join(SETUP_DIR, 'README.rst') -env_version = os.environ.get("ARVADOS_BUILDING_VERSION") - -def save_version(module, v): - with open(os.path.join(SETUP_DIR, module, "_version.py"), 'w') as fp: - return fp.write("__version__ = '%s'\n" % v) - -def read_version(module): - with open(os.path.join(SETUP_DIR, module, "_version.py"), 'r') as fp: - return re.match("__version__ = '(.*)'$", fp.read()).groups()[0] - -if env_version: - save_version("arvados_cwl", env_version) +import arvados_version +version = arvados_version.get_version(SETUP_DIR, "arvados_cwl") +if os.environ.get('ARVADOS_BUILDING_VERSION', False): + pysdk_dep = "=={}".format(version) else: - try: - import arvados_version - vtag = arvados_version.VersionInfoFromGit() - save_version("arvados_cwl", vtag.git_latest_tag() + vtag.git_timestamp_tag()) - except ImportError: - pass - -version = read_version("arvados_cwl") + # On dev releases, arvados-python-client may have a different timestamp + pysdk_dep = "<={}".format(version) setup(name='arvados-cwl-runner', version=version, @@ -44,7 +30,7 @@ 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']}, + package_data={'arvados_cwl': ['arv-cwl-schema-v1.0.yml', 'arv-cwl-schema-v1.1.yml']}, scripts=[ 'bin/cwl-runner', 'bin/arvados-cwl-runner', @@ -52,18 +38,30 @@ setup(name='arvados-cwl-runner', # 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.20180326152342', - 'schema-salad==2.6.20171201034858', - 'typing==3.5.3.0', - 'ruamel.yaml==0.13.7', - 'arvados-python-client>=0.1.20170526013812', + 'cwltool==1.0.20190831161204', + 'schema-salad==4.5.20190815125611', + 'typing >= 3.6.4', + 'ruamel.yaml >=0.15.54, <=0.15.77', + 'arvados-python-client{}'.format(pysdk_dep), 'setuptools', - 'ciso8601 >=1.0.0, <=1.0.4', + 'ciso8601 >= 2.0.0', + 'networkx < 2.3' ], + extras_require={ + ':os.name=="posix" and python_version<"3"': ['subprocess32 >= 3.5.1'], + ':python_version<"3"': ['pytz'], + }, data_files=[ ('share/doc/arvados-cwl-runner', ['LICENSE-2.0.txt', 'README.rst']), ], + classifiers=[ + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 3', + ], test_suite='tests', - tests_require=['mock>=1.0'], + tests_require=[ + 'mock>=1.0', + 'subprocess32>=3.5.1', + ], zip_safe=True )