Skip to content

Commit d2e5700

Browse files
author
Gauvain Pocentek
committed
gitlab is now a package
1 parent 105896f commit d2e5700

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Python GitLab
22

3-
python-gitlab is a Python module providing access to the GitLab server API.
3+
python-gitlab is a Python package providing access to the GitLab server API.
44

55
It supports the v3 api of GitLab.
66

gitlab renamed to bin/gitlab

File renamed without changes.

gitlab.py renamed to gitlab/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
""" Module for interfacing with GitLab-api """
17+
"""Package for interfacing with GitLab-api """
1818
from __future__ import print_function
1919
from __future__ import division
2020
from __future__ import absolute_import

setup.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44
from setuptools import setup
55

6+
import gitlab
7+
8+
69
def get_version():
7-
f = open('gitlab.py')
8-
try:
9-
for line in f:
10-
if line.startswith('__version__'):
11-
return eval(line.split('=')[-1])
12-
finally:
13-
f.close()
10+
11+
return gitlab.__version__
12+
1413

1514
setup(name='python-gitlab',
1615
version=get_version(),
@@ -20,8 +19,8 @@ def get_version():
2019
author_email='gauvain@pocentek.net',
2120
license='LGPLv3',
2221
url='https://github.com/gpocentek/python-gitlab',
23-
py_modules=['gitlab'],
24-
scripts=['gitlab'],
22+
packages=['gitlab'],
23+
scripts=['bin/gitlab'],
2524
install_requires=['requests', 'six'],
2625
classifiers=[
2726
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)