Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | setup.py (5 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
43832924ae85 | df060bfd399a | Augie Fackler | Mar 2 2022, 10:12 AM |
if not dllbasename.lower().endswith(b'.dll'): | if not dllbasename.lower().endswith(b'.dll'): | ||||
raise SystemExit( | raise SystemExit( | ||||
'Python DLL does not end with .dll: %s' % dllbasename | 'Python DLL does not end with .dll: %s' % dllbasename | ||||
) | ) | ||||
pythonlib = dllbasename[:-4] | pythonlib = dllbasename[:-4] | ||||
# Copy the pythonXY.dll next to the binary so that it runs | # Copy the pythonXY.dll next to the binary so that it runs | ||||
# without tampering with PATH. | # without tampering with PATH. | ||||
fsdecode = lambda x: x | |||||
if sys.version_info[0] >= 3: | |||||
fsdecode = os.fsdecode | |||||
dest = os.path.join( | dest = os.path.join( | ||||
os.path.dirname(self.hgtarget), | os.path.dirname(self.hgtarget), | ||||
fsdecode(dllbasename), | os.fsdecode(dllbasename), | ||||
) | ) | ||||
if not os.path.exists(dest): | if not os.path.exists(dest): | ||||
shutil.copy(buf.value, dest) | shutil.copy(buf.value, dest) | ||||
# Also overwrite python3.dll so that hgext.git is usable. | # Also overwrite python3.dll so that hgext.git is usable. | ||||
# TODO: also handle the MSYS flavor | # TODO: also handle the MSYS flavor | ||||
if sys.version_info[0] >= 3: | if sys.version_info[0] >= 3: |