forked from angelolab/ark-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
31 lines (23 loc) · 822 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
from os import pardir, path
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, setup
CYTHON_DEBUG = False
if CYTHON_DEBUG:
from Cython.Compiler.Options import get_directive_defaults
directive_defaults = get_directive_defaults()
directive_defaults["linetrace"] = True
directive_defaults["binding"] = True
CYTHON_MACROS = [("CYTHON_TRACE", "1")] if CYTHON_DEBUG else None
PKG_FOLDER = path.relpath(path.join(__file__, pardir))
extensions = [
Extension(
name="ark.utils._bootstrapping",
sources=[path.join(PKG_FOLDER, "src", "ark", "utils", "_bootstrapping.pyx")],
include_dirs=[np.get_include()],
define_macros=CYTHON_MACROS,
)
]
setup(
ext_modules=cythonize(extensions, compiler_directives={"language_level": "3"}),
)