-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
116 lines (101 loc) · 2.79 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/env python
# Project skeleton maintained at https://github.com/jaraco/skeleton
# For python 2.x must use "setuptools==44.1.1"
# For python 3.6 must use "setuptools==51.0.0" and "setuptools_scm==6.4.2"
import io
import sys
import setuptools
with io.open('README.rst', encoding='utf-8') as readme:
long_description = readme.read()
PY2 = sys.version_info[0] < 3
PY36 = sys.version_info[:2] == (3, 6)
name = 'scrunch'
description = 'Pythonic scripting library for cleaning data in Crunch'
nspkg_technique = 'native'
"""
Does this package use "native" namespace packages or
pkg_resources "managed" namespace packages?
"""
crunch_cube = "cr.cube"
requests = "requests"
if PY2:
crunch_cube = "cr.cube==2.3.9"
requests = "requests==2.27.0"
params = dict(
name=name,
use_scm_version=True,
author="Crunch.io",
author_email="[email protected]",
description=description or name,
long_description=long_description,
url="https://github.com/Crunch-io/" + name,
packages=setuptools.find_packages(),
include_package_data=True,
namespace_packages=(
name.split('.')[:-1] if nspkg_technique == 'managed'
else []
),
python_requires='>=2.7',
install_requires=[
"pycrunch==0.5.5",
requests,
crunch_cube,
'six',
],
extras_require={
'testing': [
# upstream
"pytest",
'collective.checkdocs',
# 'pytest-flake8==2.18.4',
# local
'pytest-cov==2.12.1',
'mock==3.0.5',
'isodate',
],
'docs': [
# upstream
'sphinx',
'jaraco.packaging>=3.2',
'rst.linker>=1.9',
# local
],
'pandas': ['pandas'],
},
setup_requires=[
'setuptools_scm>=1.15.0',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
],
entry_points={
},
)
if PY2:
params["install_requires"].extend([
"importlib_metadata==0.17",
# Pin dependency versions to work with python2.7.
"zipp==1.1.0",
"tabulate==0.8.10",
"configparser==4.0.2",
"scipy==1.2.3",
"numpy==1.13.3",
"contextlib2==0.6.0",
"certifi==2021.10.8"
])
elif PY36:
params["install_requires"].extend([
# Pin for python3.6
# "platformdirs==2.4.0",
"setuptools==51.0.0",
"setuptools_scm==6.4.2",
"scipy==1.1.0",
"numpy==1.15.1",
"dataclasses==0.8"
])
if __name__ == '__main__':
setuptools.setup(**params)