forked from lensacom/sparkit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (41 loc) · 1.59 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
#!/usr/bin/env python
from setuptools import setup
import splearn
import sys
def is_numpy_installed():
try:
import numpy
except ImportError:
return False
return True
def setup_package():
metadata = dict(
name='sparkit-learn',
version=str(splearn.__version__),
description='Scikit-learn on PySpark',
author='Krisztian Szucs, Andras Fulop',
author_email='[email protected], [email protected]',
license='Apache License, Version 2.0',
url='https://github.com/lensacom/sparkit-learn',
packages=['splearn',
'splearn.rdd',
'splearn.cluster',
'splearn.decomposition',
'splearn.feature_extraction',
'splearn.feature_selection',
'splearn.linear_model',
'splearn.svm'],
long_description=open('./README.rst').read(),
install_requires=open('./requirements.txt').read().split()
)
if not (len(sys.argv) >= 2
and ('--help' in sys.argv[1:] or sys.argv[1]
in ('--help-commands', 'egg_info', '--version', 'clean'))):
if is_numpy_installed() is False:
raise ImportError("Numerical Python (NumPy) is not installed.\n"
"sparkit-learn requires NumPy.\n"
"Installation instructions are available on scikit-learn website: "
"http://scikit-learn.org/stable/install.html\n")
setup(**metadata)
if __name__ == '__main__':
setup_package()