mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +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',
|
cmd = [python_exe, '-X', 'dev',
|
||||||
'-m', 'pip', 'install', '--no-build-isolation',
|
'-m', 'pip', 'install', '--no-build-isolation',
|
||||||
os.path.abspath(pkg_dir)]
|
os.path.abspath(pkg_dir)]
|
||||||
|
if support.verbose:
|
||||||
|
cmd.append('-v')
|
||||||
run_cmd('Install', cmd)
|
run_cmd('Install', cmd)
|
||||||
|
|
||||||
# Do a reference run. Until we test that running python
|
# Do a reference run. Until we test that running python
|
||||||
|
|
|
@ -10,6 +10,7 @@ from setuptools import setup, Extension
|
||||||
|
|
||||||
|
|
||||||
SOURCE = 'extension.cpp'
|
SOURCE = 'extension.cpp'
|
||||||
|
|
||||||
if not support.MS_WINDOWS:
|
if not support.MS_WINDOWS:
|
||||||
# C++ compiler flags for GCC and clang
|
# C++ compiler flags for GCC and clang
|
||||||
CPPFLAGS = [
|
CPPFLAGS = [
|
||||||
|
@ -19,8 +20,13 @@ if not support.MS_WINDOWS:
|
||||||
'-Werror',
|
'-Werror',
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
# Don't pass any compiler flag to MSVC
|
# MSVC compiler flags
|
||||||
CPPFLAGS = []
|
CPPFLAGS = [
|
||||||
|
# Display warnings level 1 to 4
|
||||||
|
'/W4',
|
||||||
|
# Treat all compiler warnings as compiler errors
|
||||||
|
'/WX',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue