Imitate Visual C++ with MinGW or other C++ compilers (for Python packages based on Visual C++)

后端 未结 1 1654
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 03:16

Is there a way to use MinGW as a substitute of MS Visual C++? A lot of Python packages need VS C++ to be installed: 4.5 GB of disk space! MinGW takes only 450 MB and reaches

相关标签:
1条回答
  • 2021-01-07 03:46

    There is no answer.

    1. MSVC

    I have sent feedback to them, yet I did not get any reply. A Python developer assured that they know about this size issue anyway and do not like it either. The only chance is a change from MSVC developers themselves. It is unlikely, but not impossible, that the size will be reduced in future releases by the MSVC team.

    1. Python distutils workaround

    The Python community will not provide a distutils workaround, see https://discuss.python.org/t/imitate-visual-c-with-mingw-or-other-c-compilers-for-python-packages-based-on-visual-c/4609/11.

    Quote from the Python forum:

    There was a workaround until Python 3.4 which might also be an approach now: Use MinGW compiler till Python 3.4 by adding a “distutils.cfg” to the folder “\Lib\distutils” in Python install directory. It would be nice to have that MinGW “distutils.cfg” workaround for the recent Python versions as well.

    Now it turns out that distutils will not be a realistic workaround.

    • There is no one who will work on it. A Python developer who was involved in the project before: Maybe there is ...

    ... someone else who might offer to help. But I wouldn’t be too optimistic.

    • And a deprecation issue:

    As an aside, now that setuptools has fully taken on distutils, we’ll be deprecating it in the standard library (soon). So this request in future would have to be made to each project implementing a build tool.

    0 讨论(0)
提交回复
热议问题