-
Notifications
You must be signed in to change notification settings - Fork 62
/
setup.py
executable file
·53 lines (44 loc) · 1.05 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
#!/usr/bin/env python
import os
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
os.environ['PBR_VERSION'] = '1.2.3'
os.environ['SKIP_WRITE_GIT_CHANGELOG'] = '1'
os.environ['SKIP_GENERATE_AUTHORS'] = '1'
extensions = [
Extension(
"indictrans._decode.beamsearch",
[
"indictrans/_decode/beamsearch.pyx"
],
include_dirs=[numpy.get_include()]
),
Extension(
"indictrans._decode.viterbi",
[
"indictrans/_decode/viterbi.pyx"
],
include_dirs=[numpy.get_include()]
),
Extension(
"indictrans._utils.ctranxn",
[
"indictrans/_utils/ctranxn.pyx"
],
include_dirs=[numpy.get_include()]
),
Extension(
"indictrans._utils.sparseadd",
[
"indictrans/_utils/sparseadd.pyx"
],
include_dirs=[numpy.get_include()]
)
]
setup(
setup_requires=['pbr'],
pbr=True,
ext_modules=cythonize(extensions)
)