Skip to content

Commit f84aed0

Browse files
committed
install from wheels only, except where a flavor still needs an sdist
--only-binary=:all: on every build, so a package with no wheel for its target fails there instead of quietly compiling third-party code on the build machine. Settable per build as only_binary; 314 slimf opts out until tornado publishes free-threaded wheels.
1 parent 55da723 commit f84aed0

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎build_winpython_meta.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def run_build(build, python_versions, dry_run=False):
9090
wheelhousereq = must_exist(build.get("wheelhousereq", ""), build, "wheelhousereq")
9191
# "pip" (default, what ships) | "none" | "parallel" | "parallel-N"
9292
my_bytecode = build.get("bytecode", "pip")
93+
# wheels only, unless a flavor still has a package with no wheel for its target
94+
my_only_binary = "yes" if build.get("only_binary", True) else "no"
9395

9496
# Get Python release info from TOML [pythons]
9597
py_target = my_python_target
@@ -134,6 +136,7 @@ def run_build(build, python_versions, dry_run=False):
134136
"--find-links", my_find_links,
135137
"--wheelhousereq", wheelhousereq,
136138
"--bytecode", my_bytecode,
139+
"--only-binary", my_only_binary,
137140
"--create-installer", my_create_installer,
138141
]
139142

‎winpython/build_winpython.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ def main():
230230
parser.add_argument('--log-dir', default='WinPython_build_logs', help='Directory for logs')
231231
parser.add_argument('--mandatory-req', help='Mandatory requirements file')
232232
parser.add_argument('--wheelhousereq', help='Wheelhouse requirements file')
233+
parser.add_argument('--only-binary', default='yes', choices=['yes', 'no'],
234+
help="'yes' (default) installs from wheels only, so a missing "
235+
"wheel fails here instead of quietly compiling third-party "
236+
"code on the build machine; 'no' for a flavor that still "
237+
"needs an sdist fallback")
233238
parser.add_argument('--bytecode', default='pip',
234239
help="byte-compilation: 'pip' (inline, the default and what ships), "
235240
"'none' (no .pyc -- for throwaway builds such as pylock generation "
@@ -277,6 +282,8 @@ def main():
277282

278283
no_compile, compile_jobs = parse_bytecode_mode(args.bytecode)
279284
pip_options = ["--force-reinstall"] + (["--no-compile"] if no_compile else [])
285+
if args.only_binary == "yes":
286+
pip_options.append("--only-binary=:all:")
280287
for label, req in [
281288
("Mandatory", args.mandatory_req),
282289
("Main", args.requirements),

‎winpython_builds.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ builds = ["dot", "dotf", "slim", "slimf"]
7878

7979
[pythons."314".overrides.slimf]
8080
bytecode = "none"
81+
# tornado ships one cp39-abi3 wheel, which no free-threaded interpreter matches,
82+
# so this flavor alone still needs the sdist fallback. The maintainer expects
83+
# free-threaded wheels during the 2026-04 cycle (tornadoweb/tornado#3501):
84+
# drop this line then, and every build is wheels-only.
85+
only_binary = false
8186

8287
# [pythons."314".overrides.slim]
8388
# create_installer = ".7z-mx7"

0 commit comments

Comments
 (0)