4363: Reject NUL characters in filenames in CollectionWriter.
[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-run',
43         'bin/arv-ws'
44         ],
45       install_requires=[
46         'python-gflags',
47         'google-api-python-client',
48         'httplib2',
49         'requests>=2.4',
50         'urllib3',
51         'ws4py'
52         ],
53       test_suite='tests',
54       tests_require=['mock>=1.0', 'PyYAML'],
55       zip_safe=False,
56       options=cmd_opts,
57       )