forked from cryoem-uoft/cryosparc-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
44 lines (40 loc) · 1.25 KB
/
Copy pathsetup.py
File metadata and controls
44 lines (40 loc) · 1.25 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
import sys
from setuptools import Extension, setup
from Cython.Build import cythonize
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"]
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"]
setup(
name="cryosparc_tools",
version="4.1.1",
description="Toolkit for interfacing with CryoSPARC",
headers=["cryosparc/include/cryosparc-tools/dataset.h"],
ext_modules=cythonize(
Extension(
name="cryosparc.core",
sources=["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/cryosparc-tools/dataset.h", "cryosparc/dataset.pxd"],
),
language_level=3,
gdb_debug=DEBUG,
),
)