diff --git a/pixi.lock b/pixi.lock index 23845657..bce41c69 100644 --- a/pixi.lock +++ b/pixi.lock @@ -6,7 +6,7 @@ platforms: - __linux=4.18 - __glibc=2.28 - __archspec=0=x86_64 -- name: linux-64-linux-5-4 +- name: linux-64-manylinux228 subdir: linux-64 virtual-packages: - __linux=5.4 @@ -19,7 +19,7 @@ platforms: - __linux=4.18 - __glibc=2.28 - __archspec=0=aarch64 -- name: linux-aarch64-linux-5-4 +- name: linux-aarch64-manylinux228 subdir: linux-aarch64 virtual-packages: - __linux=5.4 @@ -31,7 +31,7 @@ platforms: - __unix=0 - __osx=13.0 - __archspec=0=m1 -- name: osx-arm64-macos-14-0 +- name: osx-arm64-macos14 subdir: osx-arm64 virtual-packages: - __osx=14.0 @@ -1412,7 +1412,7 @@ environments: indexes: - https://pypi.org/simple packages: - osx-arm64-macos-14-0: + osx-arm64-macos14: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-types-0.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/anyio-4.15.1-pyh5ded981_1.conda @@ -1633,7 +1633,7 @@ environments: indexes: - https://pypi.org/simple packages: - linux-64-linux-5-4: + linux-64-manylinux228: - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/backports.zstd-1.3.0-py311h6b1f9c4_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.2.0-py311h66f275b_1.conda @@ -1823,7 +1823,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.23.0-pyhcf101f3_1.conda - pypi: https://files.pythonhosted.org/packages/bd/24/12818598c362d7f300f18e74db45963dbcb85150324092410c8b49405e42/pyproject_hooks-1.2.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/c5/0d/84a4380f930db0010168e0aa7b7a8fed9ba1835a8fbb1472bc6d0201d529/build-1.4.0-py3-none-any.whl - linux-aarch64-linux-5-4: + linux-aarch64-manylinux228: - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/_openmp_mutex-4.5-20_gnu.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/backports.zstd-1.3.0-py311h6ce31b0_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/brotli-python-1.2.0-py311h14a79a7_1.conda diff --git a/pixi.toml b/pixi.toml index a497831e..b0799222 100644 --- a/pixi.toml +++ b/pixi.toml @@ -18,12 +18,25 @@ authors = [ name = "ITKPythonPackage" version = "0.1.0" channels = ["conda-forge"] -platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"] +platforms = [ + "linux-64", + "linux-aarch64", + "osx-arm64", + "win-64", + { name = "linux-64-manylinux228", platform = "linux-64", glibc = "2.28", linux = "5.4" }, + { name = "linux-aarch64-manylinux228", platform = "linux-aarch64", glibc = "2.28", linux = "5.4" }, + { name = "osx-arm64-macos14", platform = "osx-arm64", macos = "14.0" }, +] ######################################## # Common features used by all envs ######################################## +# The default environment's platforms; the named entries above are for builds +[feature.host-platforms] +platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"] + + # Build tooling shared by all platforms [feature.build-dev-tools] [feature.build-dev-tools.dependencies] @@ -83,11 +96,7 @@ texlive-core = "*" # bibtex, for Doxygen \cite in wrapping docstrings wheel = "*" [feature.manylinux228-build] -platforms = ["linux-64", "linux-aarch64"] - -[feature.manylinux228-build.system-requirements] -linux = "5.4" -libc = { family = "glibc", version = "2.28" } +platforms = ["linux-64-manylinux228", "linux-aarch64-manylinux228"] [feature.linux-build.activation.env] PYTHONNOUSERSITE = "1" # Exclude system .local site packages @@ -97,8 +106,7 @@ PYTHONNOUSERSITE = "1" # Exclude system .local site packages ######################################## [feature.macosx-build] -platforms = ["osx-arm64"] -system-requirements = { macos = "14.0" } +platforms = ["osx-arm64-macos14"] # delocate is a Python tool; cxx-compiler is the macOS toolchain meta-package [feature.macosx-build.pypi-dependencies] @@ -130,6 +138,7 @@ python = ">=3.11,<3.12" # Publishing feature (no compilers needed) ######################################## [feature.publish] +platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"] [feature.publish.dependencies] python = ">=3.11" gh = "*" @@ -144,6 +153,7 @@ twine = ">=6.0" # Never referenced by any build environment. ######################################## [feature.dev] +platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"] [feature.dev.dependencies] python = ">=3.11" pytest = ">=8" @@ -159,6 +169,7 @@ description = "Run the developer unit test suite" ######################################## [environments] +default = ["host-platforms"] publish = ["publish"] dev = ["py311", "dev"] linux-py311 = ["py311", "linux-build", "build-dev-tools", "python-dev-pkgs"] diff --git a/tests/test_target_platform.py b/tests/test_target_platform.py index 12709c6b..df262de3 100644 --- a/tests/test_target_platform.py +++ b/tests/test_target_platform.py @@ -223,17 +223,20 @@ def test_macos_wheel_plat_tag_is_installable_on_arm64() -> None: def test_pixi_macos_system_requirement_matches_the_deployment_target() -> None: """pixi.toml is the third copy of the macOS version; bind it too. - ``system-requirements = { macos = "14.0" }`` under - ``[feature.macosx-build]`` must agree with + The ``macos`` virtual package on the workspace platform that + ``[feature.macosx-build]`` uses must agree with ``target_platform._MACOSX_DEPLOYMENT_TARGET``, or the cached ITK build and the wheel tag disagree. """ pixi_toml = Path(__file__).resolve().parent.parent / "pixi.toml" config = tomllib.loads(pixi_toml.read_text()) - macos_requirement = config["feature"]["macosx-build"]["system-requirements"][ - "macos" + (platform_name,) = config["feature"]["macosx-build"]["platforms"] + (platform_entry,) = [ + entry + for entry in config["workspace"]["platforms"] + if isinstance(entry, dict) and entry.get("name") == platform_name ] - assert macos_requirement.replace(".", "_") == _MACOSX_DEPLOYMENT_TARGET + assert platform_entry["macos"].replace(".", "_") == _MACOSX_DEPLOYMENT_TARGET @pytest.mark.parametrize(