forked from ewsterrenburg/python-otrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·31 lines (25 loc) · 929 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
def mk_version(base_version):
try:
try:
GIT_HEAD = open('.git/HEAD').readline().split(':')[1].strip()
except IndexError: # if we checkout a commit
GIT_HEAD_REV = open('.git/HEAD').readline()
else:
GIT_HEAD_REV = open('.git/{0}'.format(GIT_HEAD)).readline().strip()
return '{0}-git-{1:.7}'.format(base_version, GIT_HEAD_REV)
except IOError:
return base_version
setup(name='python-otrs',
version=mk_version('0.1'),
description='A programatic interface to OTRS SOAP API.',
long_description=README,
author='Jocelyn Delalande',
author_email='[email protected]',
url='https://github.com/oasiswork/python-otrs',
packages=['otrs']
)