Skip to content

Commit 837e5d2

Browse files
picnixzmiss-islington
authored andcommitted
pythongh-128978: Fix a NameError in sysconfig.expand_makefile_vars (pythonGH-128979)
This fixes a regression introduced by 4a53a39. (cherry picked from commit df66ff1) Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 032058c commit 837e5d2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/sysconfig.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,9 @@ def expand_makefile_vars(s, vars):
845845
"""
846846
import re
847847

848+
_findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
849+
_findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"
850+
848851
# This algorithm does multiple expansion, so if vars['foo'] contains
849852
# "${bar}", it will expand ${foo} to ${bar}, and then expand
850853
# ${bar}... and so forth. This is fine as long as 'vars' comes from
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a :exc:`NameError` in :func:`!sysconfig.expand_makefile_vars`. Patch by
2+
Bénédikt Tran.

0 commit comments

Comments
 (0)