21601: Move --short-tests-only check to arvados_version
[arvados.git] / tools / crunchstat-summary / setup.py
1 #!/usr/bin/env python3
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 from __future__ import absolute_import
7 import os
8 import sys
9 import re
10
11 from setuptools import setup, find_packages
12
13 SETUP_DIR = os.path.dirname(__file__) or '.'
14 README = os.path.join(SETUP_DIR, 'README.rst')
15
16 import arvados_version
17 version = arvados_version.get_version(SETUP_DIR, "crunchstat_summary")
18 if os.environ.get('ARVADOS_BUILDING_VERSION', False):
19     pysdk_dep = "=={}".format(version)
20 else:
21     # On dev releases, arvados-python-client may have a different timestamp
22     pysdk_dep = "<={}".format(version)
23 short_tests_only = arvados_version.short_tests_only()
24
25 setup(name='crunchstat_summary',
26       version=version,
27       description='Arvados crunchstat-summary reads crunch log files and summarizes resource usage',
28       author='Arvados',
29       author_email='info@arvados.org',
30       url="https://arvados.org",
31       download_url="https://github.com/arvados/arvados.git",
32       license='GNU Affero General Public License, version 3.0',
33       packages=['crunchstat_summary'],
34       include_package_data=True,
35       scripts=[
36           'bin/crunchstat-summary'
37       ],
38       data_files=[
39           ('share/doc/crunchstat_summary', ['agpl-3.0.txt']),
40       ],
41       install_requires=[
42           'arvados-python-client{}'.format(pysdk_dep),
43       ],
44       python_requires="~=3.8",
45       test_suite='tests',
46       tests_require=['pbr<1.7.0', 'mock>=1.0'],
47       zip_safe=False,
48 )