diff options
| author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-30 17:44:29 +0100 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-30 17:44:29 +0100 |
| commit | 00ab7d00a553e68eea5668dbf455404925fef6e0 (patch) | |
| tree | d4b958d09c96efb62af3b87886966bd3e1928e1b /setup.py | |
| parent | 9f256a71aa070bf28c70b2242976fbb0bc758bc4 (diff) | |
| download | gitlab-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.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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', |
