Python 3: only import subprocess32 on py27
[arvados.git] / sdk / cwl / setup.py
1 #!/usr/bin/env python
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5
6 from __future__ import absolute_import
7 import os
8 import sys
9
10 from setuptools import setup, find_packages
11
12 SETUP_DIR = os.path.dirname(__file__) or '.'
13 README = os.path.join(SETUP_DIR, 'README.rst')
14
15 import arvados_version
16 version = arvados_version.get_version(SETUP_DIR, "arvados_cwl")
17
18 setup(name='arvados-cwl-runner',
19       version=version,
20       description='Arvados Common Workflow Language runner',
21       long_description=open(README).read(),
22       author='Arvados',
23       author_email='info@arvados.org',
24       url="https://arvados.org",
25       download_url="https://github.com/curoverse/arvados.git",
26       license='Apache 2.0',
27       packages=find_packages(),
28       package_data={'arvados_cwl': ['arv-cwl-schema.yml']},
29       scripts=[
30           'bin/cwl-runner',
31           'bin/arvados-cwl-runner',
32       ],
33       # Note that arvados/build/run-build-packages.sh looks at this
34       # file to determine what version of cwltool and schema-salad to build.
35       install_requires=[
36           'cwltool==1.0.20181217162649',
37           'schema-salad==3.0.20181129082112',
38           'typing >= 3.6.4',
39           'ruamel.yaml >=0.15.54, <=0.15.77',
40           'arvados-python-client>=1.3.0.20190205182514',
41           'setuptools',
42           'ciso8601 >=1.0.6, <2.0.0',
43       ],
44       extras_require={
45           ':os.name=="posix" and python_version<"3"': ['subprocess32 >= 3.5.1'],
46       },
47       data_files=[
48           ('share/doc/arvados-cwl-runner', ['LICENSE-2.0.txt', 'README.rst']),
49       ],
50       classifiers=[
51           'Programming Language :: Python :: 2',
52           'Programming Language :: Python :: 3',
53       ],
54       test_suite='tests',
55       tests_require=[
56           'mock>=1.0',
57           'subprocess32>=3.5.1',
58       ],
59       zip_safe=True
60       )