-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
61 lines (54 loc) · 1.7 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
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy
VERSION="0.0.0"
f = open("src/VERSION","w+")
f.write(VERSION)
f.close()
extension1 = Extension(
name="src.mod2sparse",
sources=["src/include/mod2sparse.c", "src/mod2sparse.pyx"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(), 'src/include'],
extra_compile_args=['-std=c11']
)
extension2 = Extension(
name="src.c_util",
sources=["src/c_util.pyx", "src/include/mod2sparse.c"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(), 'src/include'],
extra_compile_args=['-std=c11']
)
extension3 = Extension(
name="src.bp_guessing_decoder",
sources=["src/bp_guessing_decoder.pyx", "src/include/mod2sparse.c", "src/include/bpgd.cpp"],
language='c++',
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(), 'src/include'],
extra_compile_args=['-std=c11']
)
extension4 = Extension(
name="src.osd_window",
sources=["src/osd_window.pyx", "src/include/mod2sparse.c", "src/include/mod2sparse_extra.cpp", "src/include/bpgd.cpp"],
language='c++',
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(), 'src/include'],
extra_compile_args=['-std=c11']
)
extension5 = Extension(
name="src.bp4_osd",
sources=["src/bp4_osd.pyx", "src/include/mod2sparse.c", "src/include/mod2sparse_extra.cpp", "src/include/bpgd.cpp"],
language='c++',
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(), 'src/include'],
extra_compile_args=['-std=c11']
)
setup(
version=VERSION,
ext_modules=cythonize([extension1, extension2, extension3, extension4, extension5]),
)