7 from setuptools import setup, find_packages
8 from setuptools.command.egg_info import egg_info
10 SETUP_DIR = os.path.dirname(__file__)
11 README = os.path.join(SETUP_DIR, 'README.rst')
13 class TagBuildWithCommit(egg_info):
14 """Tag the build with the sha1 and date of the last git commit.
16 If a build tag has already been set (e.g., "egg_info -b", building
17 from source package), leave it alone.
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)
31 setup(name='arvados_fuse',
33 description='Arvados FUSE driver',
34 long_description=open(README).read(),
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'],
45 'arvados-python-client>=0.1.20141203150737.277b3c7',
50 tests_require=['PyYAML'],
52 cmdclass={'egg_info': TagBuildWithCommit},