summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-30 17:44:29 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-30 17:44:29 +0100
commit00ab7d00a553e68eea5668dbf455404925fef6e0 (patch)
treed4b958d09c96efb62af3b87886966bd3e1928e1b /setup.py
parent9f256a71aa070bf28c70b2242976fbb0bc758bc4 (diff)
downloadgitlab-00ab7d00a553e68eea5668dbf455404925fef6e0.tar.gz
Rework the __version__ import
This simplifies the setup.py script Also provide a --version option for CLI
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index bbbe042..65bddb5 100644
--- a/setup.py
+++ b/setup.py
@@ -3,17 +3,11 @@
from setuptools import setup
from setuptools import find_packages
-
-
-def get_version():
- with open('gitlab/__init__.py') as f:
- for line in f:
- if line.startswith('__version__'):
- return eval(line.split('=')[-1])
+import gitlab.version
setup(name='python-gitlab',
- version=get_version(),
+ version=gitlab.version.version,
description='Interact with GitLab API',
long_description='Interact with GitLab API',
author='Gauvain Pocentek',