[b44cdf]: / setup.py

Download this file

108 lines (97 with data), 2.7 kB

  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
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
import sys
import numpy
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext
class build_ext_cxx17(build_ext):
def build_extensions(self):
std_flag = (
"-std:c++17" if self.compiler.compiler_type == "msvc" else "-std=c++17"
)
for e in self.extensions:
e.extra_compile_args.append(std_flag)
super().build_extensions()
macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
profiling = False
linetrace = False
if "--profile" in sys.argv:
profiling = True
linetrace = True
macros += [("CYTHON_TRACE_NOGIL", "1")]
sys.argv.remove("--profile")
common_cpp = Extension(
"inmoose.common_cpp",
[
"inmoose/common_cpp/common_cpp.pyx",
"inmoose/common_cpp/matrix.cpp",
],
include_dirs=[numpy.get_include()],
define_macros=macros,
)
stats_cpp = Extension(
"inmoose.utils.stats_cpp",
[
"inmoose/utils/_stats.pyx",
],
include_dirs=[numpy.get_include()],
define_macros=macros,
)
edgepy_cpp = Extension(
"inmoose.edgepy.edgepy_cpp",
[
"inmoose/edgepy/edgepy_cpp/edgepy_cpp.pyx",
"inmoose/edgepy/edgepy_cpp/interpolator.cpp",
],
include_dirs=[numpy.get_include(), "inmoose/common_cpp/"],
define_macros=macros,
)
setup(
cmdclass={"build_ext": build_ext_cxx17},
packages=[
"inmoose",
"inmoose/consensus_clustering",
"inmoose/data",
"inmoose/data/airway",
"inmoose/data/pasilla",
"inmoose/pycombat",
"inmoose/limma",
"inmoose/common_cpp",
"inmoose/edgepy",
"inmoose/edgepy/edgepy_cpp",
"inmoose/sim",
"inmoose/utils",
"inmoose/deseq2",
"inmoose/diffexp",
"inmoose/cohort_qc",
],
package_data={
"inmoose/edgepy/edgepy_cpp": [
"edgepy_cpp.pyx",
"__init__.pxd",
"edgepy_cpp.h",
"interpolator.h",
"maximize_interpolant.cpp",
"utils.h",
],
"inmoose/common_cpp": [
"matrix.h",
],
"inmoose/data/airway": [
"airway.h5ad",
],
"inmoose/data/pasilla": [
"Dmel.BDGP5.25.62.DEXSeq.chr.gff",
"geneIDsinsubset.txt",
"pasilla_gene_counts.tsv",
"pasilla_sample_annotation.csv",
"treated1fb.txt",
"treated2fb.txt",
"treated3fb.txt",
"untreated1fb.txt",
"untreated2fb.txt",
"untreated3fb.txt",
"untreated4fb.txt",
],
"inmoose/cohort_qc": ["qc_report.html"],
},
ext_modules=[common_cpp, edgepy_cpp, stats_cpp],
)