/* Argument must be a char or an int in [-128, 127] or [0, 255]. */
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
+ && !defined(_MSC_VER))
# define Py_BUILD_ASSERT_EXPR(cond) \
((void)sizeof(struct { int dummy; _Static_assert(cond, #cond); }), \
0)
cmd = [python_exe, '-X', 'dev',
'-m', 'pip', 'install', '--no-build-isolation',
os.path.abspath(pkg_dir)]
+ if support.verbose:
+ cmd.append('-v')
run_cmd('Install', cmd)
# Do a reference run. Until we test that running python
SOURCE = 'extension.c'
+
if not support.MS_WINDOWS:
# C compiler flags for GCC and clang
CFLAGS = [
'-Werror=declaration-after-statement',
)
else:
- # Don't pass any compiler flag to MSVC
- CFLAGS = []
+ # MSVC compiler flags
+ CFLAGS = [
+ # Treat all compiler warnings as compiler errors
+ '/WX',
+ ]
def main():
cmd = [python_exe, '-X', 'dev',
'-m', 'pip', 'install', '--no-build-isolation',
os.path.abspath(pkg_dir)]
+ if support.verbose:
+ cmd.append('-v')
run_cmd('Install', cmd)
# Do a reference run. Until we test that running python
SOURCE = 'extension.cpp'
+
if not support.MS_WINDOWS:
# C++ compiler flags for GCC and clang
CPPFLAGS = [
'-Werror',
]
else:
- # Don't pass any compiler flag to MSVC
- CPPFLAGS = []
+ # MSVC compiler flags
+ CPPFLAGS = [
+ # Treat all compiler warnings as compiler errors
+ '/WX',
+ ]
def main():