forked from angelolab/ark-analysis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
35 lines (27 loc) · 946 Bytes
/
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
from pathlib import Path
from typing import Tuple
import numpy as np
from Cython.Build import cythonize
from Cython.Compiler.Options import get_directive_defaults
from setuptools import Extension, setup
_compiler_directives = get_directive_defaults()
CYTHON_PROFILE_MODE = False
CYTHON_MACROS: Tuple[str,str] = None
if CYTHON_PROFILE_MODE:
_compiler_directives["linetrace"] = True
_compiler_directives["profile"] = True
_compiler_directives["emit_code_comments"] = True
CYTHON_MACROS = [("CYTHON_TRACE", "1")]
_compiler_directives["binding"] = True
_compiler_directives["language_level"] = "3"
extensions = [
Extension(
name="ark.utils._bootstrapping",
sources=[Path( "src", "ark", "utils", "_bootstrapping.pyx").as_posix()],
include_dirs=[np.get_include()],
define_macros=CYTHON_MACROS,
)
]
setup(
ext_modules=cythonize(extensions, compiler_directives=_compiler_directives),
)