forked from Crunch-io/pycrunch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (61 loc) · 1.7 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
#!/usr/bin/env python
# coding: utf-8
import os
import io
import re
import sys
thisdir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(thisdir, 'pycrunch', 'version.py')) as v_file:
VERSION = re.compile(
r".*__version__ = '(.*?)'",
re.S).match(v_file.read()).group(1)
from setuptools import setup, find_packages
def get_long_desc():
root_dir = os.path.dirname(__file__)
if not root_dir:
root_dir = '.'
readme_fn = os.path.join(root_dir, 'README.md')
with io.open(readme_fn, encoding='utf-8') as stream:
return stream.read()
needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
pytest_runner = ['pytest_runner'] if needs_pytest else []
setup_params = dict(
name='pycrunch',
version=VERSION,
description="Crunch.io Client Library",
long_description=get_long_desc(),
url='https://github.com/Crunch-io/pycrunch',
download_url='https://github.com/Crunch-io/pycrunch/archive/master.zip',
classifiers=[
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
author=u'Crunch.io',
author_email='dev@crunch.io',
license='LGPL',
install_requires=[
'requests>=2.3.0',
'six',
],
tests_require=[
'backports.unittest_mock',
'mock',
'pandas',
'pytest',
],
setup_requires=[
] + pytest_runner,
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
package_data={
'pycrunch': ['*.json', '*.csv']
},
extras_require={
'pandas': ['pandas']
},
zip_safe=True,
entry_points={},
)
if __name__ == '__main__':
setup(**setup_params)