mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.13] gh-127906: Backport test_cppext changes from the main branch (#127914)
This commit is contained in:
parent
8384279863
commit
b620e503eb
2 changed files with 10 additions and 2 deletions
|
@ -76,6 +76,8 @@ class TestCPPExt(unittest.TestCase):
|
|||
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
|
||||
|
|
|
@ -10,6 +10,7 @@ from setuptools import setup, Extension
|
|||
|
||||
|
||||
SOURCE = 'extension.cpp'
|
||||
|
||||
if not support.MS_WINDOWS:
|
||||
# C++ compiler flags for GCC and clang
|
||||
CPPFLAGS = [
|
||||
|
@ -19,8 +20,13 @@ if not support.MS_WINDOWS:
|
|||
'-Werror',
|
||||
]
|
||||
else:
|
||||
# Don't pass any compiler flag to MSVC
|
||||
CPPFLAGS = []
|
||||
# MSVC compiler flags
|
||||
CPPFLAGS = [
|
||||
# Display warnings level 1 to 4
|
||||
'/W4',
|
||||
# Treat all compiler warnings as compiler errors
|
||||
'/WX',
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue