3706: Really make the API server return the wrong data, instead of just saying so.
[arvados.git] / sdk / python / setup.py
1 #!/usr/bin/env python
2
3 import os
4 import subprocess
5 import time
6
7 from setuptools import setup, find_packages
8
9 SETUP_DIR = os.path.dirname(__file__)
10 README = os.path.join(SETUP_DIR, 'README.rst')
11
12 cmd_opts = {'egg_info': {}}
13 try:
14     git_tags = subprocess.check_output(
15         ['git', 'log', '--first-parent', '--max-count=1',
16          '--format=format:%ct %h', SETUP_DIR]).split()
17     assert len(git_tags) == 2
18 except (AssertionError, OSError, subprocess.CalledProcessError):
19     pass
20 else:
21     git_tags[0] = time.strftime('%Y%m%d%H%M%S', time.gmtime(int(git_tags[0])))
22     cmd_opts['egg_info']['tag_build'] = '.{}.{}'.format(*git_tags)
23
24
25 setup(name='arvados-python-client',
26       version='0.1',
27       description='Arvados client library',
28       long_description=open(README).read(),
29       author='Arvados',
30       author_email='info@arvados.org',
31       url="https://arvados.org",
32       download_url="https://github.com/curoverse/arvados.git",
33       license='Apache 2.0',
34       packages=find_packages(),
35       scripts=[
36         'bin/arv-copy',
37         'bin/arv-get',
38         'bin/arv-keepdocker',
39         'bin/arv-ls',
40         'bin/arv-normalize',
41         'bin/arv-put',
42         'bin/arv-ws',
43         ],
44       install_requires=[
45         'python-gflags',
46         'google-api-python-client',
47         'httplib2',
48         'urllib3',
49         'ws4py'
50         ],
51       test_suite='tests',
52       tests_require=['mock>=1.0', 'PyYAML'],
53       zip_safe=False,
54       options=cmd_opts,
55       )