changeset 48828:40a65f5594f5

setup: inline encoding constant that is only used once This was variable back when we supported Python 2. Differential Revision: https://phab.mercurial-scm.org/D12272
author Augie Fackler <augie@google.com>
date Wed, 02 Mar 2022 10:11:37 -0500
parents 1371c18e467d
children fef4198c855c
files setup.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Wed Mar 02 10:07:49 2022 -0500
+++ b/setup.py	Wed Mar 02 10:11:37 2022 -0500
@@ -22,8 +22,6 @@
 import sys, platform
 import sysconfig
 
-libdir_escape = 'unicode_escape'
-
 
 def sysstr(s):
     return s.decode('latin-1')
@@ -1116,7 +1114,7 @@
                 )
                 continue
 
-            data = data.replace(b'@LIBDIR@', libdir.encode(libdir_escape))
+            data = data.replace(b'@LIBDIR@', libdir.encode('unicode_escape'))
             with open(outfile, 'wb') as fp:
                 fp.write(data)