8000 Could you publish the 0.4.28, which ease my work on windows ? · Issue #350 · ahupp/python-magic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Could you publish the 0.4.28, which ease my work on windows ? #350
Open
@sinfomicien

Description

@sinfomicien

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:

python-magic==0.4.27; platform_system != "Windows"
python-magic @ git+https://github.com/ahupp/python-magic@62bd3c6a562b26e4005a012c30a0e86428b8defc ; platform_system == "Windows"

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

cd /opt
git clone https://github.com/microsoft/vcpkg/
cd vcpkg
.\bootstrap-vcpkg.bat

Compile and install libmagic

cd /opt/vcpkg
./vcpkg.exe install libmagic

Add to your User Path C:\opt\vcpkg\installed\x64-windows\bin

[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\opt\vcpkg\installed\x64-windows\bin", [System.EnvironmentVariableTarget]::User)

Then you need to create a MAGIC env variable pointing to magic.mgc:

[System.Environment]::SetEnvironmentVariable("MAGIC", "C:\opt\vcpkg\installed\x64-windows\tools\libmagic\share\misc\magic.mgc", [System.EnvironmentVariableTarget]::User)

P.S.: and a HUGE Thanks You all for writing and maintaining the python-magic library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0