Skip to content

Commit d878e4e

Browse files
Merge pull request #925 from PowerGridModel/fix/macos-bump
Try to fix macOS version bump
2 parents ea4d21e + 715e009 commit d878e4e

File tree

6 files changed

+13
-20
lines changed

6 files changed

+13
-20
lines changed

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sphinx:
99
configuration: docs/conf.py
1010

1111
build:
12-
os: "ubuntu-22.04"
12+
os: "ubuntu-24.04"
1313
tools:
1414
python: "3.11"
1515
apt_packages:

docs/advanced_documentation/build-guide.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ You need a C++ compiler with C++20 support. Below is a list of tested compilers:
4141

4242
**Linux**
4343

44-
* gcc >= 11.0
45-
* Version 12.x tested using the version in the `manylinux_2_28` container.
46-
* Version 12.x tested using the musllinux build with custom compiler
44+
* gcc >= 13.0
45+
* Version 14.x tested using the version in the `manylinux_2_28` container.
46+
* Version 14.x tested using the musllinux build with custom compiler
4747
* Version 13.x tested in CI
48-
* Clang >= 15.0
48+
* Clang >= 17.0
4949
* Version 18.x tested in CI
5050
* Version 18.x tested in CI with code quality checks
5151

@@ -55,12 +55,12 @@ You can define the environment variable `CXX` to for example `clang++` to specif
5555

5656
* MSVC >= 17.5
5757
* Latest release tested in CI (e.g. Visual Studio 2022, IDE or build tools)
58-
* Clang CL >= 15.0
58+
* Clang CL >= 17.0
5959
* Latest release tested in CI (e.g. Visual Studio 2022, IDE or build tools)
6060

6161
**macOS**
6262

63-
* Clang >= 14.0.3
63+
* Clang >= 15.0
6464
* Latest release tested in CI
6565

6666
### Build System for CMake Project

power_grid_model_c/power_grid_model/include/power_grid_model/common/exception.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "enum.hpp"
99

1010
#include <exception>
11+
#include <format>
1112
#include <sstream>
1213
#include <string>
1314

@@ -23,7 +24,7 @@ inline auto to_string(std::integral auto x) { return std::to_string(x); }
2324

2425
class PowerGridError : public std::exception {
2526
public:
26-
void append_msg(std::string_view msg) { msg_ += msg; }
27+
void append_msg(std::string_view msg) { msg_ = std::format("{}{}", msg_, msg); }
2728
char const* what() const noexcept final { return msg_.c_str(); }
2829

2930
private:

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ musllinux-x86_64-image = "musllinux_1_2"
127127

128128
[tool.cibuildwheel.macos]
129129
archs = ["x86_64", "arm64"]
130-
environment = { CC = "clang", CXX = "clang++" }
130+
environment = { CC = "clang", CXX = "clang++", MACOSX_DEPLOYMENT_TARGET = "13.3" }
131131

132132
[tool.cibuildwheel.windows]
133133
archs = ["AMD64"]

setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
if_win = True
1919
elif platform.system() in ["Linux", "Darwin"]:
2020
if_win = False
21+
if platform.system() == "Darwin":
22+
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "13.3"
2123
else:
2224
raise SystemError("Only Windows, Linux, or MacOS is supported!")
2325

@@ -185,10 +187,6 @@ def generate_build_ext(pkg_dir: Path, pkg_name: str):
185187
# flags for Linux and Mac
186188
cflags += ["-std=c++20", "-O3", "-fvisibility=hidden"]
187189
lflags += ["-lpthread", "-O3"]
188-
# extra flag for Mac
189-
if platform.system() == "Darwin":
190-
# compiler flag to set version
191-
cflags.append("-mmacosx-version-min=13.3")
192190

193191
# list of extensions
194192
exts = [

src/power_grid_model/validation/_rules.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@
6868
TwoValuesZeroError,
6969
ValidationError,
7070
)
71-
from power_grid_model.validation.utils import (
72-
_eval_expression,
73-
_get_mask,
74-
_get_valid_ids,
75-
_nan_type,
76-
_set_default_value,
77-
)
71+
from power_grid_model.validation.utils import _eval_expression, _get_mask, _get_valid_ids, _nan_type, _set_default_value
7872

7973
Error = TypeVar("Error", bound=ValidationError)
8074
CompError = TypeVar("CompError", bound=ComparisonError)

0 commit comments

Comments
 (0)