forked from quantumgizmos/ldpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·49 lines (43 loc) · 1.47 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
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy
VERSION="0.1.51"
f=open("src/ldpc/VERSION","w+")
f.write(VERSION)
f.close()
extension = Extension(
name="ldpc.bp_decoder",
sources=["src/ldpc/include/mod2sparse.c","src/ldpc/bp_decoder.pyx"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(),'src/ldpc/include'],
extra_compile_args=['-std=c11']
)
extension2 = Extension(
name="ldpc.mod2sparse",
sources=["src/ldpc/include/mod2sparse.c","src/ldpc/include/mod2sparse_extra.c","src/ldpc/mod2sparse.pyx"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(),'src/ldpc/include'],
extra_compile_args=['-std=c11']
)
extension3 = Extension(
name="ldpc.c_util",
sources=["src/ldpc/c_util.pyx","src/ldpc/include/mod2sparse.c","src/ldpc/include/binary_char.c","src/ldpc/include/sort.c"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(),'src/ldpc/include'],
extra_compile_args=['-std=c11']
)
extension4 = Extension(
name="ldpc.osd",
sources=["src/ldpc/osd.pyx","src/ldpc/include/mod2sparse.c","src/ldpc/include/mod2sparse_extra.c","src/ldpc/include/binary_char.c","src/ldpc/include/sort.c"],
libraries=[],
library_dirs=[],
include_dirs=[numpy.get_include(),'src/ldpc/include'],
extra_compile_args=['-std=c11']
)
setup(
version=VERSION,
ext_modules=cythonize([extension,extension2,extension3,extension4]),
)