Lines Matching +full:build +full:- +full:with +full:- +full:python
1 # gh-91321: Build a basic C++ test extension to check that the Python C API is
2 # compatible with C++ and does not emit C++ compiler warnings.
26 # With MSVC, the linker fails with: cannot open file 'python311.lib'
27 # https://github.com/python/cpython/pull/32175#issuecomment-1111175897
32 '-fsanitize' in (sysconfig.get_config_var('PY_CFLAGS') or ''),
33 'test does not work with analyzing builds')
37 # Build in a temporary directory
38 with os_helper.temp_cwd():
46 cmd = [sys.executable, '-X', 'dev', '-m', 'venv', venv_dir]
52 # Get the Python executable of the venv
53 python_exe = 'python'
57 python = os.path.join(venv_dir, 'Scripts', python_exe)
59 python = os.path.join(venv_dir, 'bin', python_exe)
73 f"{operation} failed with exit code {proc.returncode}")
75 # Build the C++ extension
76 cmd = [python, '-X', 'dev',
77 SETUP_TESTCPPEXT, 'build_ext', '--verbose']
79 cmd.append('-std=c++03')
80 run_cmd('Build', cmd)
83 cmd = [python, '-X', 'dev',
87 # Do a reference run. Until we test that running python
88 # doesn't leak references (gh-94755), run it so one can manually check
89 # -X showrefcount results against this baseline.
90 cmd = [python,
91 '-X', 'dev',
92 '-X', 'showrefcount',
93 '-c', 'pass']
97 cmd = [python,
98 '-X', 'dev',
99 '-X', 'showrefcount',
100 '-c', f"import {extension_name}"]