diff --git a/README.md b/README.md index 74b58c618..99921aeae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Python GitLab -python-gitlab is a Python module providing access to the GitLab server API. +python-gitlab is a Python package providing access to the GitLab server API. It supports the v3 api of GitLab. diff --git a/gitlab b/bin/gitlab similarity index 100% rename from gitlab rename to bin/gitlab diff --git a/gitlab.py b/gitlab/__init__.py similarity index 99% rename from gitlab.py rename to gitlab/__init__.py index 9625ac808..346612731 100644 --- a/gitlab.py +++ b/gitlab/__init__.py @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -""" Module for interfacing with GitLab-api """ +"""Package for interfacing with GitLab-api """ from __future__ import print_function from __future__ import division from __future__ import absolute_import diff --git a/setup.py b/setup.py index 4330e6c2a..141f1116c 100644 --- a/setup.py +++ b/setup.py @@ -3,14 +3,13 @@ from setuptools import setup +import gitlab + + def get_version(): - f = open('gitlab.py') - try: - for line in f: - if line.startswith('__version__'): - return eval(line.split('=')[-1]) - finally: - f.close() + + return gitlab.__version__ + setup(name='python-gitlab', version=get_version(), @@ -20,8 +19,8 @@ def get_version(): author_email='gauvain@pocentek.net', license='LGPLv3', url='https://github.com/gpocentek/python-gitlab', - py_modules=['gitlab'], - scripts=['gitlab'], + packages=['gitlab'], + scripts=['bin/gitlab'], install_requires=['requests', 'six'], classifiers=[ 'Development Status :: 5 - Production/Stable',