Mercurial > hg
changeset 48831:40e35034eac8
setup: unconditionally do this python 3 step
Differential Revision: https://phab.mercurial-scm.org/D12275
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 02 Mar 2022 10:13:09 -0500 |
parents | 3491c450dcae |
children | b07b034cf548 |
files | setup.py |
diffstat | 1 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Wed Mar 02 10:12:48 2022 -0500 +++ b/setup.py Wed Mar 02 10:13:09 2022 -0500 @@ -747,19 +747,18 @@ # 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(