From 44a48dd3889ae3865e23900752b0a712d057ca90 Mon Sep 17 00:00:00 2001 From: moe-ad Date: Wed, 8 Jan 2025 12:57:30 +0100 Subject: [PATCH] feat: cross-platform detection logic --- .ci/build_wheel.py | 3 +++ tox.ini | 13 ++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.ci/build_wheel.py b/.ci/build_wheel.py index 6acac20032..260c796c1e 100644 --- a/.ci/build_wheel.py +++ b/.ci/build_wheel.py @@ -15,6 +15,9 @@ "win": "win_amd64", "manylinux1": "manylinux1_x86_64", "manylinux_2_17": "manylinux_2_17_x86_64", + "linux": "manylinux_2_17_x86_64", # Accommodate tox.ini platform substitutions + "win32": "win_amd64", + "darwin": "any", } argParser = argparse.ArgumentParser() diff --git a/tox.ini b/tox.ini index 702390bdc9..83dd0f88e4 100644 --- a/tox.ini +++ b/tox.ini @@ -34,18 +34,9 @@ allowlist_externals = package_glob = {toxinidir}{/}dist{/}ansys_dpf_core* +# {on_platform} substitution to automatically detect os type. commands = - # Build the wheel - bash -c '\ - if [ {on_platform} == "linux" ]; then \ - export platform="manylinux_2_17"; \ - elif [ {on_platform} == "win32" ]; then \ - export platform="win"; \ - else \ - echo "Unknown OS"; \ - fi; \ - echo $platform; \ - python .ci/build_wheel.py -p $platform -w' + python .ci/build_wheel.py -p {on_platform} -w [testenv:pretest] description = Environment to kill servers and organize test files prior to testing