mercurial/0001-setup-hg3.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

2019-11-26 11:17:56 +00:00
From 65b6aac48e167645a1aa75d6a724811fb7e5c775 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Tue, 26 Nov 2019 11:10:12 +0100
Subject: [PATCH] Create hg2/hg3 bin/scripts to keep Py2 & Py3 mercurial
co-installable
2019-11-26 11:17:56 +00:00
This can be removed completely once the mercurial for Python 2 is removed.
Co-Authored-By: Petr Stodulka <pstodulk@redhat.com>
---
2019-11-26 11:17:56 +00:00
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
2019-11-26 11:17:56 +00:00
index 932608b..8663e01 100644
--- a/setup.py
+++ b/setup.py
2019-11-26 11:17:56 +00:00
@@ -196,7 +196,7 @@ def write_if_changed(path, content):
fh.write(content)
2019-11-26 11:17:56 +00:00
-scripts = ['hg']
+scripts = ['hg' + str(sys.version_info[0])]
if os.name == 'nt':
# We remove hg.bat if we are able to build hg.exe.
scripts.append('contrib/win32/hg.bat')
2019-11-26 11:17:56 +00:00
@@ -317,7 +317,7 @@ def findhg():
# and disable localization for the same reasons.
hgenv['HGPLAIN'] = '1'
hgenv['LANGUAGE'] = 'C'
2019-11-26 11:17:56 +00:00
- hgcmd = ['hg']
+ hgcmd = ['hg' + str(sys.version_info[0])]
# Run a simple "hg log" command just to see if using hg from the user's
# path works and can successfully interact with this repository. Windows
# gives precedence to hg.exe in the current directory, so fall back to the
--
2019-11-26 11:17:56 +00:00
2.23.0