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
--- 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)