# HG changeset patch # User Augie Fackler # Date 2022-03-02 15:11:37 # Node ID 40a65f5594f5443d81307d2702af52394be7a1a4 # Parent 1371c18e467d0215762353622c15cb82ffaacd10 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 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -22,8 +22,6 @@ supportedpy = ','.join( import sys, platform import sysconfig -libdir_escape = 'unicode_escape' - def sysstr(s): return s.decode('latin-1') @@ -1116,7 +1114,7 @@ class hginstallscripts(install_scripts): ) 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)