-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
55 lines (50 loc) · 1.54 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
53
54
55
import sys
from Cython.Build import cythonize
from setuptools import Extension, setup
DEBUG = False # set to True to enable debugging
libraries = []
define_macros = []
undef_macros = []
extra_compile_args = []
extra_link_args = []
if sys.platform == "win32":
extra_compile_args += ["/std:c11"]
define_macros += [("__WIN32__", 1)]
else:
libraries.append("pthread")
if sys.platform == "win32" and DEBUG:
define_macros += [("_DEBUG",)]
extra_compile_args += ["/Zi"]
extra_link_args += ["/DEBUG"]
elif DEBUG:
extra_compile_args += ["-g", "-O0", "-Wall", "-Wextra"]
setup(
name="cryosparc_tools",
version="4.6.1",
description="Toolkit for interfacing with CryoSPARC",
headers=["cryosparc/include/cryosparc-tools/dataset.h"],
ext_modules=cythonize(
Extension(
name="cryosparc.core",
sources=[
"cryosparc/include/lz4/lib/lz4.c",
"cryosparc/dataset.c",
"cryosparc/core.pyx",
],
include_dirs=["cryosparc/include/"],
libraries=libraries,
define_macros=define_macros,
undef_macros=undef_macros,
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
depends=[
"cryosparc/include/lz4/lib/lz4.h",
"cryosparc/include/cryosparc-tools/dataset.h",
"cryosparc/lz4.pxd",
"cryosparc/dataset.pxd",
],
),
language_level=3,
gdb_debug=DEBUG,
),
)