is_windows#
- scikitplot.cython.is_windows()[source]#
Return
Trueif the host operating system is native Windows.Warning
This detects the host OS, not the active compiler toolchain, and is therefore not the correct predicate for selecting compiler flags. On a native-Windows host using MinGW-w64 or an MSYS2
MINGW64shell, the active compiler is GCC, yet this function still returnsTrue. Passing MSVC flags (e.g./O2) to GCC causes a build failure or a silently unoptimized build. Use_is_msvcto select flags.- Returns:
- bool
Trueifos.name == "nt"orsys.platformstarts with"win";Falseotherwise (including WSL, Cygwin, and Linux-to-Windows cross-compilation).
- Return type:
See also
_is_msvcToolchain predicate; the correct basis for flag selection.
Notes
Retained in the public API for backward compatibility and for callers that legitimately need host-OS detection (e.g. path handling). It intentionally no longer governs the compiler-flag branches in
resolve_profile.