# HG changeset patch # User Augie Fackler # Date 2022-03-02 15:13:09 # Node ID 40e35034eac82186bd92c25d11d7f2d0fab39c10 # Parent 3491c450dcae8dc196059625ed05887c49c8b37e setup: unconditionally do this python 3 step Differential Revision: https://phab.mercurial-scm.org/D12275 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -747,19 +747,18 @@ class buildhgexe(build_ext): # Also overwrite python3.dll so that hgext.git is usable. # TODO: also handle the MSYS flavor - if sys.version_info[0] >= 3: - python_x = os.path.join( - os.path.dirname(os.fsdecode(buf.value)), - "python3.dll", + python_x = os.path.join( + os.path.dirname(os.fsdecode(buf.value)), + "python3.dll", + ) + + if os.path.exists(python_x): + dest = os.path.join( + os.path.dirname(self.hgtarget), + os.path.basename(python_x), ) - if os.path.exists(python_x): - dest = os.path.join( - os.path.dirname(self.hgtarget), - os.path.basename(python_x), - ) - - shutil.copy(python_x, dest) + shutil.copy(python_x, dest) if not pythonlib: log.warn(