-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
77 lines (70 loc) · 2.69 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
from setuptools import setup
#from numpy.distutils.core import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
import os
libraries = []
if os.name == 'posix':
libraries.append('m')
extensions = [
Extension(
"mcrforest._tree",
["mcrforest/_tree.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
),
Extension(
"mcrforest._splitter",
["mcrforest/_splitter.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
),
Extension(
"mcrforest._criterion",
["mcrforest/_criterion.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
),
Extension(
"mcrforest._utils",
["mcrforest/_utils.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
),
Extension(
"mcrforest._quad_tree",
["mcrforest/_quad_tree.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
),
Extension(
"mcrforest._random",
["mcrforest/_random.pyx"],
include_dirs=[numpy.get_include()], # not needed for fftw unless it is installed in an unusual place
libraries=libraries,
extra_compile_args=["-O3"], # not needed for fftw unless it is installed in an unusual place
)
]
for e in extensions:
e.cython_directives = {'language_level': "3"} #all are Python-3
package_data = {'mcrforest': ['*.pxd']}
setup(
name = "mcrforest",
version='3.1.0',
description='Random Forest implementation with VIM',
url='http://github.com/gavin-s-smith/mcrforest',
author='Gavin Smith',
author_email='gavin.smith@nottingham.ac.uk',
license='MIT',
packages = ["mcrforest"],
zip_safe=False,
ext_modules = cythonize(extensions),
include_package_data=True,
package_data=package_data
)