feat: set up delvewheel as the default repair wheel command for Windows (#2831)
* Add a default repair wheel command for Windows * Install `delvewheel` into Windows build tools * Add delvewheel to constraints file * Regenerate constraints * Docs * Suggest how to disable Windows wheel repair * Add tests * Run `delvewheel` with verbose mode as default * Add note about telling delvewheel where to look Suggested-by: Nils <nilsnolde@proton.me> * Partially revert 81374bb8fc43acefed76cb13d761a9e6cf6afa58 * Add `pip` and `uv` cases for build installations * Ignore `python-native.dll` for GraalPy * Ignore MSVC DLLs, try Windows amd64 graalpy happy * Fix last remaining Windows test failure (famous last words?) * Update constraints * Drop workaround unneeded with delvewheel v1.12.1 * Update docs/options.md Co-authored-by: Aohan Dang <adang1345@gmail.com> * Drop `test_delvewheel_default_on_windows` * Partially revert "Update constraints" This partially reverts commit 2dc4c0f4951858959e213463d90431a5ca03b96f. * Add a test case when repair command is `""` * Add back test that checks delvewheel run/disable * Add a C project with a missing DLL * Add tests for `missing_dll_project` * Partially undo virtualenv/python-discovery update * Fix test * Discard changes to cibuildwheel/resources/constraints-pyodide312.txt * Discard changes to cibuildwheel/resources/constraints-pyodide314.txt * Fix bad merge of constraints * Discard changes to cibuildwheel/resources/constraints-pyodide313.txt * Manually add more GraalPy pip markers * Dependency parsing was too naïve * Maybe a better way to invoke the compiler on Windows * Can we get away without a DLL? --------- Co-authored-by: Aohan Dang <adang1345@gmail.com>
This commit is contained in:
co-authored by
Aohan Dang
parent
6d9f4c9545
commit
78869d0cf6
@@ -318,12 +318,22 @@ def setup_python(
|
||||
|
||||
log.step("Installing build tools...")
|
||||
match build_frontend:
|
||||
case "pip":
|
||||
call(
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"delvewheel",
|
||||
*constraint_flags(dependency_constraint),
|
||||
env=env,
|
||||
)
|
||||
case "build":
|
||||
call(
|
||||
"pip",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"build[virtualenv]",
|
||||
"delvewheel",
|
||||
*constraint_flags(dependency_constraint),
|
||||
env=env,
|
||||
)
|
||||
@@ -337,9 +347,25 @@ def setup_python(
|
||||
where_python,
|
||||
"--upgrade",
|
||||
"build[virtualenv]",
|
||||
"delvewheel",
|
||||
*constraint_flags(dependency_constraint),
|
||||
env=env,
|
||||
)
|
||||
case "uv":
|
||||
assert uv_path is not None
|
||||
call(
|
||||
uv_path,
|
||||
"pip",
|
||||
"install",
|
||||
"--python",
|
||||
where_python,
|
||||
"--upgrade",
|
||||
"delvewheel",
|
||||
*constraint_flags(dependency_constraint),
|
||||
env=env,
|
||||
)
|
||||
case _:
|
||||
assert_never(build_frontend)
|
||||
|
||||
if python_libs_base:
|
||||
# Set up the environment for various backends to enable cross-compilation
|
||||
|
||||
@@ -37,7 +37,8 @@ packaging==26.2
|
||||
# build
|
||||
# pyodide-build
|
||||
# wheel
|
||||
pip==26.1.1
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -20,7 +22,10 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==26.1.1
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,6 +20,8 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,6 +20,8 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,7 +20,10 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==26.1.1
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,7 +20,10 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==26.1.1
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,7 +20,10 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==26.1.1
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.4.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.19.1
|
||||
@@ -20,6 +22,8 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.0.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.4.0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
pip
|
||||
build
|
||||
delocate
|
||||
delvewheel
|
||||
virtualenv
|
||||
|
||||
@@ -6,6 +6,8 @@ build==1.5.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delocate==0.13.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
delvewheel==1.12.1
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.4.0
|
||||
# via virtualenv
|
||||
filelock==3.29.0
|
||||
@@ -18,7 +20,10 @@ packaging==26.2
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==26.1.1
|
||||
pefile==2024.8.26
|
||||
# via delvewheel
|
||||
pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
|
||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.9.6
|
||||
# via
|
||||
|
||||
@@ -58,6 +58,7 @@ repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
|
||||
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
|
||||
|
||||
[tool.cibuildwheel.windows]
|
||||
repair-wheel-command = "delvewheel repair -w {dest_dir} -v {wheel}"
|
||||
|
||||
[tool.cibuildwheel.android]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user