Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | setup.py (5 lines) |
| 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: | ||||