Fix invalid escape sequence in build-many-glibcs.py

Running build-many-glibcs.py with Python 3.12 or later produces a
warning:

build-many-glibcs.py:173: SyntaxWarning: invalid escape sequence '\.'
  m = re.fullmatch('([0-9]+)\.([0-9]+)[.0-9]*', l)

Use a raw string instead to avoid that warning.  (Note: I haven't
checked whether any other Python scripts included with glibc might
have issues with newer Python versions.)
This commit is contained in:
Joseph Myers 2024-01-10 13:01:39 +00:00
parent 497e4d5030
commit 7814273540

View file

@ -170,7 +170,7 @@ class Context(object):
if l.startswith(starttext):
l = l[len(starttext):]
l = l.rstrip('"\n')
m = re.fullmatch('([0-9]+)\.([0-9]+)[.0-9]*', l)
m = re.fullmatch(r'([0-9]+)\.([0-9]+)[.0-9]*', l)
return '%s.%s' % m.group(1, 2)
print('error: could not determine glibc version')
exit(1)