Skip to content

Commit e5c673b

Browse files
committed
Add pbr for release veriosn
1 parent 69afbe6 commit e5c673b

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

setup.py

+4-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
#!/usr/bin/env python
2-
import subprocess
3-
42
from setuptools import setup
53

6-
7-
def get_version():
8-
try:
9-
output = subprocess.check_output( # nosec
10-
['git', 'describe', '--tags']
11-
).decode().strip()
12-
except subprocess.CalledProcessError:
13-
pass
14-
else:
15-
try:
16-
tag, commit_num, sha = output.split('-', 3)
17-
except ValueError:
18-
pep440_version = output
19-
else:
20-
pep440_version = '%s.dev%s' % (tag, commit_num)
21-
22-
return pep440_version
23-
24-
25-
setup(version=get_version())
4+
setup(
5+
setup_requires=['pbr'],
6+
pbr=True,
7+
)

0 commit comments

Comments
 (0)