Repository navigation
Could you publish the 0.4.28, which ease my work on windows ? #350
Copy link
Copy link
Open
Description
Activity
But few years ago my security team reject the lib because of some flaw in the .dll.
Hi @sinfomicien 👋 Could you check the (dlls in the) wheels in #294? The dlls are coming directly from msys2:
python-magic/.github/workflows/wheels.yml
Lines 92 to 125 in f35ff40
# For Windows, grabbing latest file from MSYS2 is easier than building from source # It's generally up to date ref https://packages.msys2.org/base/mingw-w64-file - name: Setup MSYS2 and install file if: runner.os == 'Windows' uses: msys2/setup-msys2@v2.27.0 with: msystem: ${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }} location: D:\ install: >- ${{ endsWith(matrix.only, '32') && 'mingw-w64-i686-file' || 'mingw-w64-x86_64-file' }} # The DLL dependency tree flattened out ref "Dependencies" https://packages.msys2.org/packages/mingw-w64-x86_64-file - name: Copy Windows ddl and mgc if: runner.os == 'Windows' run: | cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/share/misc/magic.mgc" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libmagic-1.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libsystre-0.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libtre-5.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libasprintf-0.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libintl-8.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libatomic-1.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libgomp-1.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libquadmath-0.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libstdc++-6.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libcharset-1.dll" "magic" cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libiconv-2.dll" "magic" # These are needed additionally in the win32 wheel ref https://packages.msys2.org/packages/mingw-w64-i686-file - name: Copy additional 32-bit runtime DLLs if: runner.os == 'Windows' && endsWith(matrix.only, '32') run: | cp "/msys64/mingw32/bin/libgcc_s_dw2-1.dll" "magic" cp "/msys64/mingw32/bin/libwinpthread-1.dll" "magic"
Metadata
Metadata
Assignees
Labels
No labels
Hello dear maintainers,
Since a while, i worked on windows. At the beginning, i worked with python-magic-bin. But few years ago my security team reject the lib because of some flaw in the .dll. So i started to use the vcpkg port of libmagic. And i prefer that way of doing, separate the lib from the python code. My main pain point was to maintain a fork of pythom-magic with a good way to find the lib. I discovered recently the work done to load lib on windows, so i’m not using anymore a fork, but directly the main branch.
Let me show you my requirements.txt:
If you could release a 0.4.28 , i will use the same version of the lib in dev and in production. Pleaassseeeeee release 😻 🙏
I could also submit a PR to explain how to set-up Windows env if you wish ! Something like:
Install vcpkg in the directory C:\opt
Compile and install libmagic
Add to your User Path
C:\opt\vcpkg\installed\x64-windows\binThen you need to create a MAGIC env variable pointing to magic.mgc:
P.S.: and a HUGE Thanks You all for writing and maintaining the python-magic library.