-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·87 lines (73 loc) · 2.5 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import re
from setuptools import setup, find_packages
root_dir = os.path.abspath(os.path.dirname(__file__))
def get_build_number():
fname = 'build.info'
if os.path.isfile(fname):
with open(fname) as f:
build_number = f.read()
build_number = re.sub("[^a-z0-9]+", "", build_number, flags=re.IGNORECASE)
return '.' + build_number
return ''
def get_version(package_name):
build_number = get_build_number()
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split('.')
init_path = os.path.join(root_dir, *(package_components + ['__init__.py']))
with codecs.open(init_path, 'r', 'utf-8') as f:
for line in f:
match = version_re.match(line[:-1])
if match:
return match.groups()[0]+build_number
return '0.1' + build_number
PACKAGE = 'googleservices'
setup(
name='googleservices',
version=get_version(PACKAGE),
description="A lighweight python wrapper on top of google services REST API",
author='Neta Krakover',
author_email='[email protected]',
maintainer='Neta Krakover',
maintainer_email='[email protected]',
url='https://github.com/Labgoo/PyGoogleServices',
keywords=[],
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
setup_requires=[
'setuptools',
'setuptools-lint',
'unittest2',
'coverage',
'nose'
],
tests_require=[
'google-api-python-client==1.6.2',
'oauth2client==2.1.0',
'mock',
],
install_requires=[
'google-api-python-client==1.6.2',
'oauth2client==2.1.0',
'pycryptodome',
'requests==2.7.0',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries :: Python Modules"
],
test_suite='tests',
)