# HG changeset patch # User Augie Fackler # Date 2022-03-02 15:12:17 # Node ID fef4198c855cf231b274811e2f419ffbcafa9ee9 # Parent 40a65f5594f5443d81307d2702af52394be7a1a4 setup: inline os.fsdecode now that we're done with Python 2 Differential Revision: https://phab.mercurial-scm.org/D12273 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -741,12 +741,9 @@ class buildhgexe(build_ext): # Copy the pythonXY.dll next to the binary so that it runs # without tampering with PATH. - fsdecode = lambda x: x - if sys.version_info[0] >= 3: - fsdecode = os.fsdecode dest = os.path.join( os.path.dirname(self.hgtarget), - fsdecode(dllbasename), + os.fsdecode(dllbasename), ) if not os.path.exists(dest): @@ -756,7 +753,7 @@ class buildhgexe(build_ext): # TODO: also handle the MSYS flavor if sys.version_info[0] >= 3: python_x = os.path.join( - os.path.dirname(fsdecode(buf.value)), + os.path.dirname(os.fsdecode(buf.value)), "python3.dll", )