-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not set compiler to mingw32 on Windows #5
Conversation
With this patch, msvc is used, which is the default for building Python extensions on Windows. Currently, one must force usage of msvc when building bdist_wheel and installing with something like: %PYTHON% -m pip install . -vv --global-option build --global-option --compiler=msvc --global-option build --global-option --cythonize This kind of command will no longer work in the next major release of pip: pypa/pip#8368
Thanks for your PR. I don't understand the link with pypa/pip#8368 ? This only explains that the command "install" will not be run anymore if the bdist_wheel command fails. Thus there is not impact on your command line, you can still use it and set the compiler you want. |
I don't think so. Currently if bdist_wheel cannot be executed due to options being passed, it falls back to Without this PR merged in, I need to provide these options to complete the installation, which will no longer work with the next pip release. Also, it doesn't make a lot of sense IMHO to use mingw32 as compiler since Python on Windows uses msvc as default anyway. Building binary extensions with mingw32 is certainly not impossible, but it is quite convoluted to do so. |
Ok, I understand your needs but it solves only the issue for msvc users. It is a half-solution. The pip 21.0 seems to impose that As I understand the pypa/pip#8368 issue, the following command will remain correct and not deprecated:
A wheel will be systematically generated then installed |
If I execute that command now I get:
And it proceeds with IMHO solving the issue for msvc users is the most important thing here: building extensions with mingw32 is a very exotic and complicated thing to do, and is because of this rarely done. |
Just to be absolutely clear: with that command no wheel is generated. |
Ok, but I have exactly the same warning running the command:
The wheel is correctly created (this is mainly exactly the same as running This warning is a nonsense and no decision has been made about it: see pypa/pip#2677 (comment). |
The Either way, even if you are not convinced about the significance of the upcoming changes in pip, I believe that you should still consider merging this PR in, as it makes no sense to make mingw32 the default compiler on Windows. |
Ok for merging and make msvc as default compiler on windows. By the way, the warning will be still here due to the need of the |
Many thanks! |
With this patch, msvc is used, which is the default for building
Python extensions on Windows.
Currently, one must force usage of msvc when building bdist_wheel and
installing with something like:
This kind of command will no longer work in the next major release of
pip: pypa/pip#8368