Skip to content

Commit 3af386b

Browse files
committed
fix: only install host-neutral Python wheels
1 parent 6d6ce5f commit 3af386b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

guests/python/Justfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,18 @@ python-site-packages: download-python-sdk
134134
fi
135135

136136
python -m venv "{{PYTHON_TMP_VENV}}"
137+
138+
# Notes:
139+
# - "only binary" means "only wheels, no sdist", i.e. we don't need to run any Python lib build code
140+
# - "implementation=py" ensures that we use the most neutral wheel possible, i.e. not actual binary code
137141
"{{PYTHON_TMP_VENV}}"/bin/pip install \
138142
--disable-pip-version-check \
143+
--no-deps \
139144
--ignore-installed \
145+
--implementation=py \
140146
--isolated \
147+
--only-binary=:all: \
148+
--python-version={{PYTHON_VERSION_FULL}} \
141149
--requirement=requirements.txt \
142150
--target="{{PYTHON_SITE_PACKAGES}}"
143151

0 commit comments

Comments
 (0)