From 2822bcaaa96a2be192ee900991dc1fdc46b245ee Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 29 May 2024 00:27:36 +0200 Subject: [PATCH] Fix install on Windows --- .github/workflows/wheels.yml | 2 +- add_libmagic.sh | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c922a55..cd3b48e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -68,7 +68,7 @@ jobs: build-wheels: - name: Build ${{ matrix.only }} + name: build ${{ matrix.only }} needs: build-wheels-matrix runs-on: ${{ matrix.os }} diff --git a/add_libmagic.sh b/add_libmagic.sh index 7b6038f..ba90bdc 100755 --- a/add_libmagic.sh +++ b/add_libmagic.sh @@ -6,17 +6,19 @@ install_source() { # install from source # https://www.darwinsys.com/file/ # https://github.com/file/file/blob/FILE5_45/INSTALL#L51 - version="file-5.45" && - tmpfile="$(mktemp)" && - curl -sSLo "${tmpfile}" "https://astron.com/pub/file/${version}.tar.gz" && - tar xvf "${tmpfile}" && - cd "${version}" && - ./configure && - make && - make install && - make installcheck && - cd .. && - rm -r "${version}" + ( + version="file-5.45" && + tmpfile="$(mktemp)" && + curl -sSLo "${tmpfile}" "https://astron.com/pub/file/${version}.tar.gz" && + tar xvf "${tmpfile}" && + cd "${version}" && + ./configure && + make && + make install && + make installcheck && + cd .. && + rm -r "${version}" + ) || ( cd .. && false ) } install_precompiled() { @@ -37,6 +39,7 @@ install_precompiled() { else # windows (no install, just download into current working directory) # could also consider install using `pacman`: https://packages.msys2.org/base/mingw-w64-file + # which would require an update of copy_libmagic below to account for new magic.mgc paths python <