Skip to content

Commit 201d76c

Browse files
committed
Add pure Python verification step
There must be only one wheel and it must be pure Python.
1 parent 1377b85 commit 201d76c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,16 @@ runs:
6666
run: python -m build --wheel .
6767
if: ${{ inputs.pure_python_wheel == 'true' }}
6868

69-
# TODO: check that the resulting wheel is indeed pure Python
69+
- name: Verify that one pure Python wheel was built
70+
shell: bash
71+
run: |
72+
ls -1 dist/*
73+
if [ $(ls -1 dist/*.whl 2>/dev/null | wc -l) != 1 ] ||
74+
[ $(ls -1 dist/*none-any.whl 2>/dev/null | wc -l) != 1 ]; then
75+
echo "::error ::Build failed because package is not pure Python."
76+
exit 1
77+
fi
78+
if: ${{ inputs.pure_python_wheel == 'true' }}
7079

7180
- name: Test pure Python wheel distribution
7281
shell: bash

0 commit comments

Comments
 (0)