Skip to content

Commit 97feee0

Browse files
committed
Use ddl from msys2
1 parent 0b49a23 commit 97feee0

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/wheels.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,21 @@ jobs:
8686
if: runner.os == 'Linux'
8787
uses: docker/setup-qemu-action@v3
8888

89-
- name: Setup MSYS2 and install regex
89+
- name: Setup MSYS2 and install file
9090
if: runner.os == 'Windows'
9191
uses: msys2/setup-msys2@v2
9292
with:
9393
msystem: MINGW64
9494
update: true
95+
install: >-
96+
${{ endsWith(matrix.only, '32') && 'mingw-w64-i686-file' || 'mingw-w64-x86_64-file' }}
97+
98+
- name: Copy Windows ddl and mgc
99+
if: runner.os == 'Windows'
100+
run:
101+
cp "/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/share/misc/magic.mgc" "magic"
102+
cp "/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libmagic-1.dll" "magic"
103+
cp "/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libsystre-0.dll" "magic"
95104

96105
- uses: pypa/cibuildwheel@v2.17.0 # sync version with pip install cibuildwheel above
97106
timeout-minutes: 10

add_libmagic.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ copy_libmagic() {
5757
ls -ltra magic
5858
}
5959

60+
# skip windows (taken care of separately in wheels.yml)
61+
python -c 'import platform; assert platform.system() != "Windows"' || exit 0
6062
# prefer a recent build from source
6163
install_source || install_precompiled
6264
# files to be copied into the wheel

0 commit comments

Comments
 (0)