gh-128978: Fix a NameError in sysconfig.expand_makefile_vars (#128979)

This fixes a regression introduced by 4a53a397c3.
This commit is contained in:
Bénédikt Tran 2025-01-20 14:27:14 +01:00 committed by GitHub
parent 59fcae793f
commit df66ff14b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -718,6 +718,9 @@ def expand_makefile_vars(s, vars):
"""
import re
_findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
_findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"
# This algorithm does multiple expansion, so if vars['foo'] contains
# "${bar}", it will expand ${foo} to ${bar}, and then expand
# ${bar}... and so forth. This is fine as long as 'vars' comes from

View file

@ -0,0 +1,2 @@
Fix a :exc:`NameError` in :func:`!sysconfig.expand_makefile_vars`. Patch by
Bénédikt Tran.