qulogic / rpms / mercurial

Forked from rpms/mercurial 3 years ago
Clone
Blob Blame History Raw
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

This can be removed completely once the mercurial for Python 2 is removed.

Co-Authored-By: Petr Stodulka <pstodulk@redhat.com>
---
 setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 932608b..8663e01 100644
--- a/setup.py
+++ b/setup.py
@@ -196,7 +196,7 @@ def write_if_changed(path, content):
             fh.write(content)
 
 
-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')
@@ -317,7 +317,7 @@ def findhg():
     # and disable localization for the same reasons.
     hgenv['HGPLAIN'] = '1'
     hgenv['LANGUAGE'] = 'C'
-    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
-- 
2.23.0