|
a |
|
b/setup.py |
|
|
1 |
import sys |
|
|
2 |
|
|
|
3 |
import numpy |
|
|
4 |
from setuptools import Extension, setup |
|
|
5 |
from setuptools.command.build_ext import build_ext |
|
|
6 |
|
|
|
7 |
|
|
|
8 |
class build_ext_cxx17(build_ext): |
|
|
9 |
def build_extensions(self): |
|
|
10 |
std_flag = ( |
|
|
11 |
"-std:c++17" if self.compiler.compiler_type == "msvc" else "-std=c++17" |
|
|
12 |
) |
|
|
13 |
for e in self.extensions: |
|
|
14 |
e.extra_compile_args.append(std_flag) |
|
|
15 |
super().build_extensions() |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")] |
|
|
19 |
profiling = False |
|
|
20 |
linetrace = False |
|
|
21 |
if "--profile" in sys.argv: |
|
|
22 |
profiling = True |
|
|
23 |
linetrace = True |
|
|
24 |
macros += [("CYTHON_TRACE_NOGIL", "1")] |
|
|
25 |
sys.argv.remove("--profile") |
|
|
26 |
|
|
|
27 |
common_cpp = Extension( |
|
|
28 |
"inmoose.common_cpp", |
|
|
29 |
[ |
|
|
30 |
"inmoose/common_cpp/common_cpp.pyx", |
|
|
31 |
"inmoose/common_cpp/matrix.cpp", |
|
|
32 |
], |
|
|
33 |
include_dirs=[numpy.get_include()], |
|
|
34 |
define_macros=macros, |
|
|
35 |
) |
|
|
36 |
|
|
|
37 |
stats_cpp = Extension( |
|
|
38 |
"inmoose.utils.stats_cpp", |
|
|
39 |
[ |
|
|
40 |
"inmoose/utils/_stats.pyx", |
|
|
41 |
], |
|
|
42 |
include_dirs=[numpy.get_include()], |
|
|
43 |
define_macros=macros, |
|
|
44 |
) |
|
|
45 |
|
|
|
46 |
edgepy_cpp = Extension( |
|
|
47 |
"inmoose.edgepy.edgepy_cpp", |
|
|
48 |
[ |
|
|
49 |
"inmoose/edgepy/edgepy_cpp/edgepy_cpp.pyx", |
|
|
50 |
"inmoose/edgepy/edgepy_cpp/interpolator.cpp", |
|
|
51 |
], |
|
|
52 |
include_dirs=[numpy.get_include(), "inmoose/common_cpp/"], |
|
|
53 |
define_macros=macros, |
|
|
54 |
) |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
setup( |
|
|
58 |
cmdclass={"build_ext": build_ext_cxx17}, |
|
|
59 |
packages=[ |
|
|
60 |
"inmoose", |
|
|
61 |
"inmoose/consensus_clustering", |
|
|
62 |
"inmoose/data", |
|
|
63 |
"inmoose/data/airway", |
|
|
64 |
"inmoose/data/pasilla", |
|
|
65 |
"inmoose/pycombat", |
|
|
66 |
"inmoose/limma", |
|
|
67 |
"inmoose/common_cpp", |
|
|
68 |
"inmoose/edgepy", |
|
|
69 |
"inmoose/edgepy/edgepy_cpp", |
|
|
70 |
"inmoose/sim", |
|
|
71 |
"inmoose/utils", |
|
|
72 |
"inmoose/deseq2", |
|
|
73 |
"inmoose/diffexp", |
|
|
74 |
"inmoose/cohort_qc", |
|
|
75 |
], |
|
|
76 |
package_data={ |
|
|
77 |
"inmoose/edgepy/edgepy_cpp": [ |
|
|
78 |
"edgepy_cpp.pyx", |
|
|
79 |
"__init__.pxd", |
|
|
80 |
"edgepy_cpp.h", |
|
|
81 |
"interpolator.h", |
|
|
82 |
"maximize_interpolant.cpp", |
|
|
83 |
"utils.h", |
|
|
84 |
], |
|
|
85 |
"inmoose/common_cpp": [ |
|
|
86 |
"matrix.h", |
|
|
87 |
], |
|
|
88 |
"inmoose/data/airway": [ |
|
|
89 |
"airway.h5ad", |
|
|
90 |
], |
|
|
91 |
"inmoose/data/pasilla": [ |
|
|
92 |
"Dmel.BDGP5.25.62.DEXSeq.chr.gff", |
|
|
93 |
"geneIDsinsubset.txt", |
|
|
94 |
"pasilla_gene_counts.tsv", |
|
|
95 |
"pasilla_sample_annotation.csv", |
|
|
96 |
"treated1fb.txt", |
|
|
97 |
"treated2fb.txt", |
|
|
98 |
"treated3fb.txt", |
|
|
99 |
"untreated1fb.txt", |
|
|
100 |
"untreated2fb.txt", |
|
|
101 |
"untreated3fb.txt", |
|
|
102 |
"untreated4fb.txt", |
|
|
103 |
], |
|
|
104 |
"inmoose/cohort_qc": ["qc_report.html"], |
|
|
105 |
}, |
|
|
106 |
ext_modules=[common_cpp, edgepy_cpp, stats_cpp], |
|
|
107 |
) |