Skip to content

[3.13] gh-127906: Backport test_cppext changes from main #127914

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

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/test/test_cppext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def run_cmd(operation, cmd):
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
Expand Down
10 changes: 8 additions & 2 deletions Lib/test/test_cppext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


SOURCE = 'extension.cpp'

if not support.MS_WINDOWS:
# C++ compiler flags for GCC and clang
CPPFLAGS = [
Expand All @@ -19,8 +20,13 @@
'-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():
Expand Down
Loading