Mercurial > hg-git
comparison setup.py @ 912:5cc9594cc811
Add version info to hggit for "hg --version -v"
getversion() also reports dulwich version
author | anatoly techtonik <techtonik@gmail.com> |
---|---|
date | Tue, 17 Mar 2015 15:05:00 +0300 |
parents | e6489cf3fe8c |
children | 21264429a8d4 |
comparison
equal
deleted
inserted
replaced
911:017db283e685 | 912:5cc9594cc811 |
---|---|
7 from collections import OrderedDict | 7 from collections import OrderedDict |
8 extra_req = [] | 8 extra_req = [] |
9 except ImportError: | 9 except ImportError: |
10 extra_req = ['ordereddict>=1.1'] | 10 extra_req = ['ordereddict>=1.1'] |
11 | 11 |
12 | |
13 from os.path import dirname, join | |
14 def get_version(relpath): | |
15 root = dirname(__file__) | |
16 for line in open(join(root, relpath), 'rb'): | |
17 line = line.decode('utf-8') | |
18 if '__version__' in line: | |
19 return line.split("'")[1] | |
20 | |
21 | |
12 setup( | 22 setup( |
13 name='hg-git', | 23 name='hg-git', |
14 version='0.8.1', | 24 version=get_version('hggit/__init__.py'), |
15 author='The hg-git Authors', | 25 author='The hg-git Authors', |
16 maintainer='Augie Fackler', | 26 maintainer='Augie Fackler', |
17 maintainer_email='durin42@gmail.com', | 27 maintainer_email='durin42@gmail.com', |
18 url='http://hg-git.github.com/', | 28 url='http://hg-git.github.com/', |
19 description='push to and pull from a Git repository using Mercurial', | 29 description='push to and pull from a Git repository using Mercurial', |