4831: Change ObjectType dropdown label.
[arvados.git] / services / fuse / 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 from setuptools.command.egg_info import egg_info
9
10 SETUP_DIR = os.path.dirname(__file__)
11 README = os.path.join(SETUP_DIR, 'README.rst')
12
13 class TagBuildWithCommit(egg_info):
14     """Tag the build with the sha1 and date of the last git commit.
15
16     If a build tag has already been set (e.g., "egg_info -b", building
17     from source package), leave it alone.
18     """
19     def tags(self):
20         if self.tag_build is None:
21             git_tags = subprocess.check_output(
22                 ['git', 'log', '--first-parent', '--max-count=1',
23                  '--format=format:%ct %h', SETUP_DIR]).split()
24             assert len(git_tags) == 2
25             git_tags[0] = time.strftime(
26                 '%Y%m%d%H%M%S', time.gmtime(int(git_tags[0])))
27             self.tag_build = '.{}+{}'.format(*git_tags)
28         return egg_info.tags(self)
29
30
31 setup(name='arvados_fuse',
32       version='0.1',
33       description='Arvados FUSE driver',
34       long_description=open(README).read(),
35       author='Arvados',
36       author_email='info@arvados.org',
37       url="https://arvados.org",
38       download_url="https://github.com/curoverse/arvados.git",
39       license='GNU Affero General Public License, version 3.0',
40       packages=['arvados_fuse'],
41       scripts=[
42         'bin/arv-mount'
43         ],
44       install_requires=[
45         'arvados-python-client>=0.1.20141203150737.277b3c7',
46         'llfuse',
47         'python-daemon'
48         ],
49       test_suite='tests',
50       tests_require=['PyYAML'],
51       zip_safe=False,
52       cmdclass={'egg_info': TagBuildWithCommit},
53       )