Skip to content

Commit 006dcf0

Browse files
committed
wheels: Use normal delvewheel command
1 parent bc42e14 commit 006dcf0

File tree

3 files changed

+32
-10
lines changed

3 files changed

+32
-10
lines changed

bin/cibw_before_build_windows.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
22

3+
#
4+
# This script was previously needed to make libpythonXX.a on Windows when using
5+
# MinGW and setuptools. This is no longer needed now that we use meson.
6+
#
7+
38
set -o errexit
49

510
# Uncomment this to run cibuildwheel locally on Windows:
@@ -28,15 +33,13 @@ echo ---------------------------------------------------
2833
# Find pythonXX.dll and make a .a library #
2934
###################################################
3035

31-
# XXX: Maybe this is not necessary any more with meson?
36+
cd $homepath
37+
gendef python${VER}.dll
38+
dlltool --dllname python${VER}.dll \
39+
--def python${VER}.def \
40+
--output-lib libpython${VER}.a
3241

33-
#cd $homepath
34-
#gendef python${VER}.dll
35-
#dlltool --dllname python${VER}.dll \
36-
# --def python${VER}.def \
37-
# --output-lib libpython${VER}.a
38-
#
39-
#mv libpython${VER}.a libs
42+
mv libpython${VER}.a libs
4043

4144
###################################################
4245
# Install build dependencies #

bin/cibw_repair_wheel_command_windows.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# https://github.com/scipy/scipy/blob/main/tools/wheels/repair_windows.sh
66

7+
#
8+
# This was previously needed because delvewheel would reject wheels with
9+
# binaries generated by MinGW unless they had been stripped. This is not needed
10+
# any more with newer versions of delvewheel.
11+
#
12+
713
set -o errexit
814

915
# Uncomment this to run cibuildwheel locally on Windows:

pyproject.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,18 @@ before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
9090

9191
[tool.cibuildwheel.windows]
9292
before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh"
93-
before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh"
94-
repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}"
93+
before-build = "pip install delvewheel"
94+
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
95+
96+
# Previously with setuptools and MinGW it was necessary to run
97+
# bin/cibw_before_build_windows.sh before building the wheel to create the
98+
# libpython*.a files. This is no longer necessary now meson is used:
99+
#
100+
# before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh"
101+
#
102+
# Previously a custom delvewheel command was needed because delvewheel would
103+
# reject binaries created with MinGW unless they had been stripped. This is not
104+
# needed any more with newer versions of delvewheel:
105+
#
106+
# repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}"
107+
#

0 commit comments

Comments
 (0)