From 6c0bfae1a601df1a434e7f5b30ad7fb06900f439 Mon Sep 17 00:00:00 2001 From: Antony Lewis Date: Mon, 19 Aug 2024 07:54:54 +0100 Subject: [PATCH] wheels [pypi] --- .github/workflows/build_wheels.yml | 1 + camb/_config.py | 6 ++---- fortran/Makefile | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ebbb6356..791539f3 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -37,6 +37,7 @@ jobs: if: matrix.os == 'macos-13' || matrix.os == 'macos-13-xlarge' env: MACOSX_DEPLOYMENT_TARGET: 13 + CIBW_BUILD: cp311-* CIBW_SKIP: pp* CIBW_BUILD_VERBOSITY: 1 run: python -m cibuildwheel --output-dir wheelhouse diff --git a/camb/_config.py b/camb/_config.py index 65f30e8e..3fce3603 100644 --- a/camb/_config.py +++ b/camb/_config.py @@ -39,15 +39,13 @@ def global_error_message(self): return bytearray(self._global_error_message).decode('ascii').strip() def check_global_error(self, reference=''): - code = self.global_error_flag - if code: - err = config.global_error_message() + if code := self.global_error_flag: self.global_error_flag = 0 if reference: reference = 'Error in Fortran called from %s:\n' % reference else: reference = '' - if err: + if err := config.global_error_message(): raise CAMBError(reference + '%s' % err) else: raise CAMBError(reference + 'Error code: %s' % code) diff --git a/fortran/Makefile b/fortran/Makefile index 4358391a..d5ffb621 100644 --- a/fortran/Makefile +++ b/fortran/Makefile @@ -96,7 +96,7 @@ COMMON_FFLAGS = -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp FFLAGS = -O3 $(COMMON_FFLAGS) DEBUGFLAGS = -g -fbacktrace -ffpe-trap=invalid,overflow,zero -fbounds-check $(COMMON_FFLAGS) ifeq ($(shell uname -s),Darwin) -SFFLAGS = -dynamiclib #-fpic +SFFLAGS = -dynamiclib -static-libgfortran #-fpic else SFFLAGS = -shared -fpic endif diff --git a/setup.py b/setup.py index 120629df..6411a635 100644 --- a/setup.py +++ b/setup.py @@ -256,7 +256,7 @@ def finalize_options(self): def get_tag(self): _, _, plat = super().get_tag() - if "osx_12" in plat or "osx_13" in plat: + if "osx_12" in plat: return _, _, plat return "py3", "none", plat