setup.py
changeset 46869 ed286d150aa8
parent 46819 d4ba4d51f85f
child 46996 8d2b62d716b0
equal deleted inserted replaced
46868:802ba3c81507 46869:ed286d150aa8
   814                     fsdecode(dllbasename),
   814                     fsdecode(dllbasename),
   815                 )
   815                 )
   816 
   816 
   817                 if not os.path.exists(dest):
   817                 if not os.path.exists(dest):
   818                     shutil.copy(buf.value, dest)
   818                     shutil.copy(buf.value, dest)
       
   819 
       
   820                 # Also overwrite python3.dll so that hgext.git is usable.
       
   821                 # TODO: also handle the MSYS flavor
       
   822                 if sys.version_info[0] >= 3:
       
   823                     python_x = os.path.join(
       
   824                         os.path.dirname(fsdecode(buf.value)),
       
   825                         "python3.dll",
       
   826                     )
       
   827 
       
   828                     if os.path.exists(python_x):
       
   829                         dest = os.path.join(
       
   830                             os.path.dirname(self.hgtarget),
       
   831                             os.path.basename(python_x),
       
   832                         )
       
   833 
       
   834                         shutil.copy(python_x, dest)
   819 
   835 
   820         if not pythonlib:
   836         if not pythonlib:
   821             log.warn(
   837             log.warn(
   822                 'could not determine Python DLL filename; assuming pythonXY'
   838                 'could not determine Python DLL filename; assuming pythonXY'
   823             )
   839             )