forked from max-lancaster/namsel
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
85 lines (77 loc) · 3.96 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
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy as np
import platform
if platform.system() == "Windows":
setup(
name = 'Namsel OCR',
version = '16.10',
description = 'A system for performing OCR on machine-printed Tibetan text',
url = 'http://www.namsel.com',
author = 'Zach Rowinski',
author_email = 'zach.rowinski@gmail.com',
license = 'MIT',
install_requires=['PIL', 'numpy', 'sklearn', 'cython', 'cairo', 'pango', 'pangocairo'],
cmdclass = {'build_ext': build_ext},
ext_modules = [Extension("sobel_features", [r"features\sobel_features.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("zernike_moments", [r"features\zernikeh.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("transitions", [r"features\transitions.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("viterbi_cython", ["viterbi_cython.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("fast_utils", ["fast_utils.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
# Extension("features", ["features.pyx"],
# include_dirs=[np.get_include()],
# extra_compile_args=['-O3', '-ffast-math'],
# )
])
else:
setup(
name = 'Namsel OCR',
version = '16.10',
description = 'A system for performing OCR on machine-printed Tibetan text',
url = 'http://www.namsel.com',
author = 'Zach Rowinski',
author_email = 'zach.rowinski@gmail.com',
license = 'MIT',
install_requires=['PIL', 'numpy', 'sklearn', 'cython', 'cairo', 'pango', 'pangocairo'],
cmdclass = {'build_ext': build_ext},
ext_modules = [Extension("sobel_features", ["features/sobel_features.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("zernike_moments", ["features/zernikeh.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("transitions", ["features/transitions.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("viterbi_cython", ["viterbi_cython.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
Extension("fast_utils", ["fast_utils.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=['-O3', '-ffast-math'],
),
# Extension("features", ["features.pyx"],
# include_dirs=[np.get_include()],
# extra_compile_args=['-O3', '-ffast-math'],
# )
])