-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
executable file
·36 lines (32 loc) · 965 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
33
34
35
36
#!/usr/bin/env python
from setuptools import setup, find_packages, Extension
try:
from Cython.Build import cythonize
import numpy as np
except ImportError:
use_cython = False
else:
use_cython = True
version = open('graphs/_version.py').read().strip().split('=', 1)[1].strip(" '")
setup_kwargs = dict(
name='graphs',
version=version,
author='CJ Carey',
author_email='[email protected]',
description='A library for graph-based machine learning.',
url='http://github.com/all-umass/graphs',
license='MIT',
packages=find_packages(exclude=['tests']),
package_data={'': ['*.pyx']},
install_requires=[
'numpy >= 1.8',
'scipy >= 0.14',
'scikit-learn >= 0.15',
'matplotlib >= 1.3.1',
'Cython >= 0.21',
],
)
if use_cython:
exts = [Extension('*', ['graphs/*/*.pyx'], include_dirs=[np.get_include()])]
setup_kwargs['ext_modules'] = cythonize(exts)
setup(**setup_kwargs)