forked from Ibotta/sk-dist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
83 lines (75 loc) · 2.25 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
"""
Run setup
"""
from setuptools import setup, find_packages
from skdist import __version__
DISTNAME = "sk-dist"
VERSION = __version__
DESCRIPTION = "Distributed scikit-learn meta-estimators with PySpark"
with open("README.rst") as f:
LONG_DESCRIPTION = f.read()
CLASSIFIERS = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering",
]
AUTHOR = "Ibotta Inc."
AUTHOR_EMAIL = "[email protected]"
LICENSE = "Apache 2.0"
DOWNLOAD_URL = "https://pypi.org/project/sk-dist/#files"
PROJECT_URLS = {"Source Code": "https://github.com/Ibotta/sk-dist"}
MIN_PYTHON_VERSION = "3.5"
MIN_PANDAS_VERSION = "0.17.0"
MIN_NUMPY_VERSION = "1.16.5"
MIN_SKLEARN_VERSION = "0.20.0"
# MAX_SKLEARN_VERSION = "0.23.2"
MAX_SKLEARN_VERSION = "1.4"
MIN_XGBOOST_VERSION = "0.4"
PYARROW_VERSION = "0.16.0"
MIN_PYSPARK_VERSION = "2.4.4"
MIN_PYTESTSPARK_VERSION = "0.4.5"
install_requires = [
"scikit-learn>={0},<{1}".format(MIN_SKLEARN_VERSION, MAX_SKLEARN_VERSION),
"pandas>={0}".format(MIN_PANDAS_VERSION),
"numpy>={0}".format(MIN_NUMPY_VERSION),
"scipy",
"joblib",
]
tests_require = [
"xgboost>={0}".format(MIN_XGBOOST_VERSION),
"pyarrow=={0}".format(PYARROW_VERSION),
"pyspark>={0}".format(MIN_PYSPARK_VERSION),
"pytest-spark>={0}".format(MIN_PYTESTSPARK_VERSION),
]
def parse_description(description):
"""
Strip figures and alt text from description
"""
return "\n".join(
[
a
for a in description.split("\n")
if ("figure::" not in a) and (":alt:" not in a)
]
)
setup(
name=DISTNAME,
version=VERSION,
description=DESCRIPTION,
long_description=parse_description(LONG_DESCRIPTION),
classifiers=CLASSIFIERS,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
download_url=DOWNLOAD_URL,
project_urls=PROJECT_URLS,
packages=find_packages(),
python_requires=">={0}".format(MIN_PYTHON_VERSION),
install_requires=install_requires,
tests_require=tests_require,
extras_require=dict(tests=tests_require),
)