diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 1165fd67..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,56 +0,0 @@ -# name: Release Version - -# # When merged into main -# # - Only when src is changed -# # - minor version bump - if new test functions are added? -# # - patch version bump - if no new tests - -# on: -# push: -# branches: -# - main - -# jobs: -# release: -# name: Creating release -# runs-on: "ubuntu-latest" -# permissions: write-all -# defaults: -# run: -# shell: bash -l {0} -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# fetch-depth: 2 - -# - name: Early exit -# env: -# GH_RUN_ID: ${{ github.run_id }} -# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: make gh-has-src-changed || make gh-cancel - -# - name: Setup -# run: | -# git config --global user.name 'Github Actions' -# git config --global user.email 'none@none.none' - -# - name: -# run: echo $(git log -5 --oneline) - -# - name: Bump version -# run: make bump-version-auto - -# - name: Commit version -# run: make commit-version-tag - -# - name: Push to main -# run: git push origin $(git rev-parse --abbrev-ref HEAD) --tags - -# - name: Create release -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# export tag="$( make version )" -# echo "$tag" -# make gh-release diff --git a/_compile.py b/_compile.py index 62381ac3..382ed0ba 100644 --- a/_compile.py +++ b/_compile.py @@ -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 @@ -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") @@ -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