-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
52 lines (47 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
#!/usr/bin/env python
from setuptools import setup, Extension
from Cython.Build import cythonize
from Cython.Compiler import Options
import numpy
def get_extension_modules(include_dirs):
extensions = []
# Distance functions
extensions.append(Extension("hifive.libraries._hic_distance", ["hifive/libraries/_hic_distance.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
# Binning functions
extensions.append(Extension("hifive.libraries._hic_binning", ["hifive/libraries/_hic_binning.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
extensions.append(Extension("hifive.libraries._fivec_binning", ["hifive/libraries/_fivec_binning.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
# Interaction functions
extensions.append(Extension("hifive.libraries._hic_interactions", ["hifive/libraries/_hic_interactions.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
# Optimization functions
extensions.append(Extension("hifive.libraries._hic_optimize", ["hifive/libraries/_hic_optimize.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
extensions.append(Extension("hifive.libraries._fivec_optimize", ["hifive/libraries/_fivec_optimize.pyx",
"hifive/libraries/_normal.cpp"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
# Domain functions
extensions.append(Extension("hifive.libraries._hic_domains", ["hifive/libraries/_hic_domains.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
extensions.append(Extension("hifive.libraries._hmm", ["hifive/libraries/_hmm.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
# Quasar functions
extensions.append(Extension("hifive.libraries._quasar", ["hifive/libraries/_quasar.pyx"],
include_dirs=include_dirs, language="c++",
extra_compile_args=[]))
return extensions
extensions = get_extension_modules([numpy.get_include()])
setup(
name='hifive',
ext_modules = cythonize(extensions, compiler_directives={"language_level": 3, "profile": False}),
)