Skip to content

Commit 79236f0

Browse files
lorenzwidmeraseyboldt
authored andcommitted
Switched back to lapack/blas for conda build.
1 parent bf72310 commit 79236f0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

sunode/build_cvodes.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
headers = common + linsolve + cvodes
1919
include = []
2020
library_dirs = []
21+
extra_libs = []
2122

2223
if sys.platform == 'win32':
2324
with open(os.path.join(base, "source_cvodes_win.c")) as fsource:
2425
source_content = fsource.read()
25-
include.append(os.path.join(os.environ["CONDA_PREFIX"], "Library", "include"))
26-
library_dirs.append(os.path.join(os.environ["CONDA_PREFIX"], "Library", "lib"))
26+
include += [os.path.join(os.environ["CONDA_PREFIX"], "Library", "include")]
27+
library_dirs += [os.path.join(os.environ["CONDA_PREFIX"], "Library", "lib")]
2728

28-
extra_libs = []
2929
# lapackdense is not supported by the windows build of sundials
3030
for name in ['sunlinsol_lapackdense', 'sunlinsol_klu']:
3131
headers = [fn for fn in headers if name not in fn]
@@ -35,13 +35,14 @@
3535

3636
#test if we can use conda libraries
3737
if "CONDA_PREFIX" in os.environ:
38-
include.append(os.path.join(os.environ["CONDA_PREFIX"], "include"))
39-
library_dirs.append(os.path.join(os.environ["CONDA_PREFIX"], "lib"))
38+
include += [os.path.join(os.environ["CONDA_PREFIX"], "include")]
39+
library_dirs += [os.path.join(os.environ["CONDA_PREFIX"], "lib")]
40+
extra_libs += ["blas", "lapack"]
4041
else:
41-
include.append("/usr/include/suitesparse/")
42+
include += ["/usr/include/suitesparse/"]
43+
extra_libs.append("openblas")
4244

43-
extra_libs = [
44-
"openblas",
45+
extra_libs += [
4546
"pthread",
4647
"klu",
4748
"sundials_sunlinsollapackdense",

0 commit comments

Comments
 (0)