Skip to content

Commit

Permalink
feat: cross-platform detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Jan 8, 2025
1 parent 08579b4 commit 44a48dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .ci/build_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 2 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44a48dd

Please sign in to comment.