参考:https://docs.python.org/zh-cn/3.10/distutils/configfile.html
https://www.pythonf.cn/read/168890
编译 M2Crypto时遇到 openssl 头文件找不到,可以用setup.py 的build_ext模式,将额外参数传递给swig(或gcc)
python setup.py build_ext -I/d/soft/msys64/mingw64/include –openssl /d/openssl -cmingw32
D:\soft\msys64\usr\bin\swig.exe -python -py3 -ID:\soft\Python38\include -ID:\soft\Python38\include -I/usr/include/openssl -includeall -modern -builtin -outdir D:\works\Python\M2Crypto-0.38.0\src\M2Crypto -o src/SWIG/_m2crypto_wrap.c src/SWIG/_m2crypto.i
Deprecated command line option: -modern. This option is now always on.
src/SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
src/SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
src/SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
src/SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
src/SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'D:\\soft\\msys64\\usr\\bin\\swig.exe' failed with exit status 1