-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
40 lines (31 loc) · 820 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
36
37
38
39
40
import os
from setuptools import setup
# Cython Extensions
ext_modules = []
try:
# isort: off
# This import must come after the setuptools import
from Cython.Build import cythonize
import scipy # pylint: disable=unused-import
# isort: on
cython_available = True
except ImportError:
cython_available = False
build_cython = cython_available and not (
"CHOLUPDATES_DISABLE_CYTHON_BUILD" in os.environ
and os.environ["CHOLUPDATES_DISABLE_CYTHON_BUILD"] == "1"
)
if build_cython:
ext_modules.extend(
cythonize(
[
"src/cholupdates/_blas_polymorphic.pyx",
"src/cholupdates/rank_1/_seeger_impl_cython.pyx",
]
),
)
else:
print("Not building Cython extensions")
setup(
ext_modules=ext_modules,
)