Install the following softwares:
- Visual Studio 2019 for C++ development
- Chocolatey
- Git
- Python
Install M2Crypto build dependencies by running these commands on an admin PowerShell prompt:
choco install openssl
choco install swig
Build M2Crypto wheels from source by running these commands on a PowerShell prompt:
git clone --branch 0.38.0 https://gitlab.com/m2crypto/m2crypto
cd m2crypto
python -m venv venv --prompt=m2crypto
.\venv\Scripts\activate
python -m pip install wheel pywin32
python setup.py build --openssl="C:\Program Files\OpenSSL-Win64" --bundledlls
python setup.py bdist_wheel
Install M2Crypto on your project using the built wheel: pip install C:\path\to\m2crypto\dist\file.whl