Merge branch 'master' of git.curoverse.com:arvados into 4227-date-display
[arvados.git] / services / nodemanager / 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__) or "."
10 cmd_opts = {'egg_info': {}}
11 try:
12     git_tags = subprocess.check_output(
13         ['git', 'log', '--first-parent', '--max-count=1',
14          '--format=format:%ct %h', SETUP_DIR]).split()
15     assert len(git_tags) == 2
16 except (AssertionError, OSError, subprocess.CalledProcessError):
17     pass
18 else:
19     git_tags[0] = time.strftime('%Y%m%d%H%M%S', time.gmtime(int(git_tags[0])))
20     cmd_opts['egg_info']['tag_build'] = '.{}.{}'.format(*git_tags)
21
22 setup(name='arvados-node-manager',
23       version='0.1',
24       description='Arvados compute node manager',
25       long_description=open(os.path.join(SETUP_DIR, 'README.rst')).read(),
26       author='Arvados',
27       author_email='info@arvados.org',
28       url="https://arvados.org",
29       license='GNU Affero General Public License, version 3.0',
30       packages=find_packages(),
31       install_requires=[
32         'apache-libcloud',
33         'arvados-python-client',
34         'pykka',
35         'python-daemon',
36         ],
37       scripts=['bin/arvados-node-manager'],
38       test_suite='tests',
39       tests_require=['mock>=1.0'],
40       zip_safe=False,
41       options=cmd_opts,
42       )