forked from digideskio/datasheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·48 lines (41 loc) · 1.54 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
import ast
import re
from setuptools import setup
def ensure_one_level_of_quotes(text):
# Converts '"foo"' to 'foo'
return str(ast.literal_eval(text))
def get_version():
""" Based on the functionality in pallets/click's setup.py
(https://github.com/pallets/click/blob/master/setup.py) """
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('datasheets/__init__.py', 'rb') as f:
lines = f.read().decode('utf-8')
version = ensure_one_level_of_quotes(_version_re.search(lines).group(1))
return version
required = [
'google_auth',
'google_auth_oauthlib',
'pandas',
'numpy',
'google-api-python-client>=1.5.4',
'six>=1.10.0', # required by google-api-python-client but not installed by it
'httplib2!=0.10.2', # Skip 0.10.2 becauses it causes httplib2.CertificateValidationUnsupported error
]
setup(
name='datasheets',
description='Read data from, write data to, and format Google Sheets from Python',
version=get_version(),
author='Squarespace Data Engineering',
url='https://github.com/Squarespace/datasheets',
download_url='https://github.com/Squarespace/datasheets/tarball/{}'.format(get_version()),
packages=['datasheets'],
install_requires=required,
license='Apache License 2.0',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
],
)