Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions .github/workflows/release.yml

This file was deleted.

32 changes: 8 additions & 24 deletions _compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,6 @@ def find_env() -> dict[str, str]:

fc = os.environ.get("FC", DEFAULT_FC)

linker_mathlib_dirs = [
"/usr/lib/", # Debian
"/lib/", # Alpine
"/usr/local/lib/", # FreeBSD
"/usr/lib64/", # Redhat
]

mathlib_path = None

for dir in linker_mathlib_dirs:

if not Path(dir).is_dir():
continue

mathlib_path = dir
break

if mathlib_path is None:
print("Unable to find mathlib path")

# TODO Check if FC is there, not not raise Error
# TODO Check if lapack / blas is there, if not raise Error
# TODO Check if omp is installed
Expand Down Expand Up @@ -113,12 +93,11 @@ def find_env() -> dict[str, str]:
linker_math = [
"-lblas",
"-llapack",
"-L/usr/lib/",
]

if mathlib_path is not None:
linker_math += [f"-L{mathlib_path}"]

if sys.platform == "darwin":
# MacOS X specific flags
if "darwin" in sys.platform:

expected_omp_dir = Path("/opt/homebrew/opt/libomp/lib")

Expand All @@ -136,6 +115,11 @@ def find_env() -> dict[str, str]:
compiler_openmp = []
linker_openmp = []

# FreeBSD specific flags
if "freebsd" in sys.platform:
# Location of BLAS / Lapack for FreeBSD 14
linker_math += ["-L/usr/local/lib/"]

fflags = [] + compiler_flags + compiler_openmp
ldflags = [] + linker_flags + linker_math + linker_openmp

Expand Down
Loading