https://github.com/python/cpython/commit/261fe713087cc11eb9f59e9bd1bdc5e8c71f1f68 commit: 261fe713087cc11eb9f59e9bd1bdc5e8c71f1f68 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-10-13T08:25:39Z summary:
[3.15] Fix mypy bump for Tools/peg_generator/pegen/build.py (GH-159256) (#159298) Fix mypy bump for Tools/peg_generator/pegen/build.py (GH-159256) (cherry picked from commit ce5c012a8acf29b111db42eba342d72885f3e8be) Co-authored-by: Hugo van Kemenade <[email protected]> files: M Tools/peg_generator/pegen/build.py diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py index bc3657067a8da2e..c11fcaef7b22fff 100644 --- a/Tools/peg_generator/pegen/build.py +++ b/Tools/peg_generator/pegen/build.py @@ -154,9 +154,10 @@ def compile_c_extension( # HACK: Our output directory for free-threaded builds has moved, and so # tests running in-tree require our sys.executable directory for libs library_dirs.append(str(pathlib.Path(sys.executable).parent)) + sources = [generated_source_path] extension = Extension( extension_name, - sources=[generated_source_path], + sources=sources, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, ) @@ -214,19 +215,19 @@ def compile_c_extension( ] ) else: - extension.sources[0:0] = common_sources + sources[0:0] = common_sources # Compile the source code to object files. ext_path = cmd.get_ext_fullpath(extension_name) - if newer_group(extension.sources, ext_path, "newer"): + if newer_group(sources, ext_path, "newer"): objects = compiler.compile( - extension.sources, + sources, output_dir=cmd.build_temp, debug=cmd.debug, extra_postargs=extra_compile_args, ) else: - objects = compiler.object_filenames(extension.sources, output_dir=cmd.build_temp) + objects = compiler.object_filenames(sources, output_dir=cmd.build_temp) # The cmd.get_libraries() call needs a valid compiler attribute or we will # get an incorrect library name on the free-threaded Windows build. cmd.compiler = compiler _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
