From e1972279084aa9639f7e96eccefe6e4a24e7e4c4 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Sat, 20 Dec 2025 16:40:28 -0500 Subject: [PATCH] fix(meson): address #13 Address regresion in meson 1.10.1 by pinning version to 1.9.1 --- build-config/python/meson.build | 4 ++-- pyproject.toml | 2 +- utils/wheels/build-wheels-macos_aarch64.sh | 24 +--------------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/build-config/python/meson.build b/build-config/python/meson.build index b1afd178..222c14ec 100644 --- a/build-config/python/meson.build +++ b/build-config/python/meson.build @@ -7,10 +7,10 @@ if meson.is_cross_build() and host_machine.system() == 'darwin' py_inc_dir = include_directories('../../cross/python_includes/python-' + py_ver + '/include/python' + py_ver) py_dep = declare_dependency(include_directories: py_inc_dir) py_module_prefix = '' - py_module_suffic = 'so' + py_module_suffix = 'so' meson.override_dependency('python3', py_dep) else py_dep = py_installation.dependency() py_module_prefix = '' - py_module_suffic = 'so' + py_module_suffix = 'so' endif diff --git a/pyproject.toml b/pyproject.toml index 6fbb15f2..f1caffce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "meson-python>=0.15.0", # Use a recent version - "meson>=1.6.0", # Specify your Meson version requirement + "meson==1.9.1", # Specify your Meson version requirement "pybind11>=2.10" # pybind11 headers needed at build time ] build-backend = "mesonpy" diff --git a/utils/wheels/build-wheels-macos_aarch64.sh b/utils/wheels/build-wheels-macos_aarch64.sh index a4c8c442..4b72ad88 100755 --- a/utils/wheels/build-wheels-macos_aarch64.sh +++ b/utils/wheels/build-wheels-macos_aarch64.sh @@ -31,18 +31,6 @@ cd "${TMPDIR}/project" # 3. Build Configuration export MACOSX_DEPLOYMENT_TARGET=15.0 -# Meson options passed to pip via config-settings -# Note: We use an array to keep the command clean -MESON_ARGS=( - "-Csetup-args=-Dunity=off" - "-Csetup-args=-Dbuild-python=true" - "-Csetup-args=-Dbuild-fortran=false" - "-Csetup-args=-Dbuild-tests=false" - "-Csetup-args=-Dpkg-config=false" - "-Csetup-args=-Dunity-safe=true" -) - -PYTHON_VERSIONS=("3.8.20" "3.9.23" "3.10.18" "3.11.13" "3.12.11" "3.13.5" "3.13.5t" "3.14.0rc1" "3.14.0rc1t" 'pypy3.10-7.3.19' "pypy3.11-7.3.20") PYTHON_VERSIONS=("3.9.23" "3.10.18" "3.11.13" "3.12.11" "3.13.5" "3.13.5t" "3.14.0rc1" "3.14.0rc1t" 'pypy3.10-7.3.19' "pypy3.11-7.3.20") if ! command -v pyenv &> /dev/null; then @@ -56,12 +44,6 @@ for PY_VERSION in "${PYTHON_VERSIONS[@]}"; do ( set -e - # Check if version exists in pyenv - if ! pyenv versions --bare --filter="${PY_VERSION}" &>/dev/null; then - echo "⚠️ Python version matching '${PY_VERSION}' not found by pyenv. Skipping." - continue - fi - pyenv shell "${PY_VERSION}" PY="$(pyenv which python)" @@ -72,12 +54,8 @@ for PY_VERSION in "${PYTHON_VERSIONS[@]}"; do # Install build deps explicitly so we can skip build isolation "$PY" -m pip install --upgrade pip setuptools wheel meson meson-python delocate - # PERF: --no-build-isolation prevents creating a fresh venv and reinstalling meson/ninja # for every single build, saving significant I/O and network time. - CC="ccache clang" CXX="ccache clang++" "$PY" -m pip wheel . \ - --no-build-isolation \ - "${MESON_ARGS[@]}" \ - -w "${WHEEL_DIR}" -vv + CC="ccache clang" CXX="ccache clang++" "$PY" -m pip wheel . --no-build-isolation -w "${WHEEL_DIR}" -v # We expect exactly one new wheel in the tmp dir per iteration CURRENT_WHEEL=$(find "${WHEEL_DIR}" -name "*.whl" | head -n 1)