File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 44import shlex
55import shutil
66import subprocess
7+ import sys
78import unittest
89from test import support
910
2728class BaseTests :
2829 TEST_INTERNAL_C_API = False
2930
30- def test_build (self ):
31- self .check_build ('_testcppext' )
32-
3331 def check_build (self , extension_name , std = None , limited = False ):
3432 venv_dir = 'env'
3533 with support .setup_venv_with_pip_setuptools (venv_dir ) as python_exe :
@@ -91,6 +89,9 @@ def run_cmd(operation, cmd):
9189
9290
9391class TestPublicCAPI (BaseTests , unittest .TestCase ):
92+ def test_build (self ):
93+ self .check_build ('_testcppext' )
94+
9495 @support .requires_gil_enabled ('incompatible with Free Threading' )
9596 def test_build_limited_cpp03 (self ):
9697 self .check_build ('_test_limited_cpp03ext' , std = 'c++03' , limited = True )
@@ -119,6 +120,13 @@ def test_build_cpp14(self):
119120class TestInteralCAPI (BaseTests , unittest .TestCase ):
120121 TEST_INTERNAL_C_API = True
121122
123+ def test_build (self ):
124+ kwargs = {}
125+ if sys .platform == 'darwin' :
126+ # Old Apple clang++ default C++ std is gnu++98
127+ kwargs ['std' ] = 'c++11'
128+ self .check_build ('_testcppext_internal' , ** kwargs )
129+
122130
123131if __name__ == "__main__" :
124132 unittest .main ()
Original file line number Diff line number Diff line change 1616#ifdef TEST_INTERNAL_C_API
1717 // gh-135906: Check for compiler warnings in the internal C API
1818# include " internal/pycore_frame.h"
19- // mimalloc emits compiler warnings when Python is built on Windows
20- // and macOS.
21- # if !defined(MS_WINDOWS) && !defined(__APPLE__)
19+ // mimalloc emits compiler warnings on Windows.
20+ # if !defined(MS_WINDOWS)
2221# include " internal/pycore_backoff.h"
2322# include " internal/pycore_cell.h"
2423# endif
You can’t perform that action at this time.
0 commit comments