Skip to content

Commit b147791

Browse files
committed
Iterate on install step
1 parent ef5e300 commit b147791

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/testing-install.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,23 @@ jobs:
3434

3535
- name: Install from built artifacts
3636
run: |
37-
# Use the wheel if it's pure-python; fallback to sdist otherwise
38-
pip install dist/*.whl || pip install dist/*.tar.gz
37+
python - <<EOF
38+
import glob
39+
import os
40+
import subprocess
41+
42+
# Find wheel and sdist files
43+
wheels = glob.glob('dist/*.whl')
44+
sdists = glob.glob('dist/*.tar.gz')
45+
46+
# Try wheel first, then sdist
47+
if wheels:
48+
subprocess.check_call(['pip', 'install', wheels[0]])
49+
elif sdists:
50+
subprocess.check_call(['pip', 'install', sdists[0]])
51+
else:
52+
raise Exception("No wheel or sdist found in dist/")
53+
EOF
3954
4055
- name: Verify import & version
4156
run: |

0 commit comments

Comments
 (0)