-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (29 loc) · 802 Bytes
/
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
#!/usr/bin/env python
from setuptools import setup, Extension
try:
from Cython.Build import cythonize
import numpy as np
except ImportError:
use_cython = False
else:
use_cython = True
setup_kwargs = dict(
name='sparray',
version='0.0.4',
author='CJ Carey',
author_email='[email protected]',
description='Sparse representation for ndarrays',
url='http://github.com/perimosocordiae/sparray',
license='MIT',
packages=['sparray'],
package_data={'': ['*.pyx']},
install_requires=[
'numpy >= 1.9',
'scipy >= 0.15',
'Cython >= 0.21',
],
)
if use_cython:
exts = [Extension('*', ['sparray/*.pyx'], include_dirs=[np.get_include()])]
setup_kwargs['ext_modules'] = cythonize(exts, language_level='3')
setup(**setup_kwargs)