Skip to content Skip to sidebar Skip to footer

Imitate Visual C++ With Mingw Or Other C++ Compilers (for Python Packages Based On Visual C++)?

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 the sa

Solution 1:

There is no chance for this idea.

  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.

Post a Comment for "Imitate Visual C++ With Mingw Or Other C++ Compilers (for Python Packages Based On Visual C++)?"