Skip to content
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

BUG: Fix problems detecting runtime for MSYS2 compiler on Windows #8675

Merged
merged 2 commits into from
Feb 23, 2017

Conversation

rolk
Copy link
Contributor

@rolk rolk commented Feb 23, 2017

This set of patches fixes problems in the compiler setup code when attempting to compile Numpy on Windows with a Python distribution which is not compiled with MSVC (but with for instance the GNU compiler in MSYS2). The old code contained some tests which assumed that a version string from the MSVC compiler was present in the system information string.

The msvccompiler module is made in the same mold as the msvc9compiler
module; saving the two environment variables around the call to
initialize. However, the signaure in the msvccompiler module's version
of the MSVCCompiler class, there is no plat_name argument to the method.

Since this is not used anyway but just passed along, it can simply be
removed.

This bug can be exposed even if you are not using the Intel Fortran
compiler, because the class is loaded in an attempt to probe for all
compilers, if the correct compiler is not found yet.
If Python has been built using a different runtime, for example using
the GNU compiler in MSYS, the version string will of course not contain
a reference to the MSVC runtime. Instead of attempting to build an
import library for yet another runtime, we assume that the compiler
used to build the extension is now the same as was used to build Python,
and that it will pass the right runtime to the linker without any
further command-line options.
@rgommers rgommers merged commit f6fe023 into numpy:master Feb 23, 2017
@rgommers
Copy link
Member

LGTM, thanks @rolk

@rgommers
Copy link
Member

Hmm, Appveyor is acting weird. The PR was already green, but when I merged the Appveyor builds changed to "cancelled" and the commit indicator to a red X.

I don't think anything is wrong, but if the next PR fails then need to investigate.

@charris
Copy link
Member

charris commented Feb 23, 2017

There are a lot of merged PRs that have the failed test marker that I think is the same problem.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Feb 23, 2017
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Mar 1, 2017
@charris
Copy link
Member

charris commented Mar 1, 2017

Will not backport, one of a series of PRs.

@charris charris removed this from the 1.12.1 release milestone Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants