forked from progressivis/progressivis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
133 lines (121 loc) · 4.53 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
"""
Setup file for progressivis.
"""
import os
import os.path
import versioneer
from setuptools import setup, Command
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy as np
PACKAGES = ['progressivis',
'progressivis.core',
'progressivis.core.khash',
'progressivis.storage',
'progressivis.io',
'progressivis.stats',
'progressivis.datasets',
'progressivis.vis',
'progressivis.cluster',
'progressivis.metrics',
'progressivis.server',
'progressivis.table']
#'stool'
class RunBench(Command):
"""Runs all ProgressiVis benchmarks"""
description = "run all benchmarks"
user_options = [] # distutils complains if this is not here.
def __init__(self, *args):
self.args = args[0] # so we can pass it to other classes
Command.__init__(self, *args)
def initialize_options(self):
"distutils wants this"
pass
def finalize_options(self):
"distutils wants this"
pass
def run(self):
"Run the benchark"
for root, _, files in os.walk("benchmarks"):
for fname in files:
if fname.startswith("bench_") and fname.endswith(".py"):
pathname = os.path.join(root, fname)
self._run_it(pathname)
def _run_it(self, pathname):
if self.verbose: # verbose is provided "automagically"
print('Should be running bench "{0}"'.format(pathname))
#TODO run the command with the right arguments
EXTENSIONS = [
Extension(
"progressivis.core.fast",
["progressivis/core/fast.pyx"],
include_dirs=[np.get_include(),],
extra_compile_args=['-Wfatal-errors'],
),
Extension("progressivis.core.khash.hashtable",
["progressivis/core/khash/hashtable.pyx",],
include_dirs=['progressivis/core/khash/klib',
'progressivis/core/khash',
np.get_include()],
extra_compile_args=['-Wfatal-errors'])]
def read(fname):
"Read the content of fname as string"
with open(os.path.join(os.path.dirname(__file__), fname)) as infile:
return infile.read()
setup(
name="progressivis",
version=versioneer.get_version(),
author="Jean-Daniel Fekete",
author_email="[email protected]",
url="https://github.com/jdfekete/progressivis",
description="A Progressive Steerable Analytics Toolkit",
license="BSD",
keywords="Progressive analytics visualization",
packages=PACKAGES,
long_description=read('README.md'),
classifiers=["Development Status :: 2 - PRe-Alpha",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering :: Information Analysis",
"License :: OSI Approved :: BSD License"],
platforms='any',
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
#install_requires=required,
install_requires=["Pillow>=4.2.0",
"numpy>=1.11.3",
"scipy>=0.18.1",
"numexpr>=2.6.1",
"tables>=3.3.0",
"pandas>=0.19.1",
"scikit-learn>=0.18.1",
"tdigest>=0.4.1.0",
"flask>=0.12.1",
"eventlet>=0.22.0",
"flask-socketio>=2.9.0",
"h5py>=2.6.0",
"zarr>=2.2.0",
"numcodecs>=0.5.5",
"bcolz>=1.1.2",
"datashape>=0.5.2",
"pyroaring>=0.2.3",
"msgpack-python>=0.4.8",
"python-dateutil==2.6.1", # botocore wants < 2.7.0,>=2.1
"boto",
"s3fs",
"sqlalchemy",
"memory_profiler",
"tabulate",
"requests",
"fast-histogram",
"rangehttpserver"],
#"pptable",
setup_requires=['cython', 'numpy', 'nose>=1.3.7', 'coverage'],
#test_suite='tests',
test_suite='nose.collector',
cmdclass=versioneer.get_cmdclass({'bench': RunBench}),
ext_modules=cythonize(EXTENSIONS),
package_data={
# If any package contains *.md, *.txt or *.rst files, include them:
'doc': ['*.md', '*.rst'],
}
)