From 4a1e156e8a8663232173f4cbc6ba55f2221a5e13 Mon Sep 17 00:00:00 2001 From: Chris Hold Date: Tue, 6 Feb 2024 16:52:56 +0200 Subject: [PATCH] More defaults for win and openblas --- .github/workflows/python-safpy.yml | 2 +- safpy_build.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-safpy.yml b/.github/workflows/python-safpy.yml index bd0fcdb..ef68939 100644 --- a/.github/workflows/python-safpy.yml +++ b/.github/workflows/python-safpy.yml @@ -47,7 +47,7 @@ jobs: elif [ "$RUNNER_OS" == "Windows" ]; then curl https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.26/OpenBLAS-0.3.26-x64.zip -L -o tmp.zip 7z x ./tmp.zip -oOpenBLAS - cp ./OpenBLAS/lib/libopenblas.lib ./openblas.lib + cp ./OpenBLAS/lib/libopenblas.lib ./libopenblas.lib ls echo $PWD else diff --git a/safpy_build.py b/safpy_build.py index 8ce5133..2774236 100644 --- a/safpy_build.py +++ b/safpy_build.py @@ -23,10 +23,14 @@ if sys.platform == "darwin": print("SAFPY using default Apple Accelerate") extra_link_args.extend(['-Wl,-framework', '-Wl,Accelerate']) -else: +elif sys.platform == "linux": print("SAFPY using default OpenBLAS/LAPACKE") saf_performance_lib.extend(["openblas", "lapacke"]) - +elif sys.platform == "win32": + print("SAFPY using default OpenBLAS/LAPACKE") + saf_performance_lib.extend(["libopenblas"]) # should include lapacke +else: + print("No defaults.") # cdef() expects a single string declaring the C types, functions and # globals needed to use the shared object. It must be in valid C syntax.