53899096c8
- separate lang into the own subpackage as files are shared between mercurial for both pythons - extensions are now prepared and working only under Python2 - the core mercurial is prepared in mercurial-python3 subpackage providing the hg3 executable - Relates: #1737931
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
From 313f85a013b487149bff441411d4b643d0cea6c2 Mon Sep 17 00:00:00 2001
|
|
From: Petr Stodulka <pstodulk@redhat.com>
|
|
Date: Thu, 15 Aug 2019 01:20:11 +0200
|
|
Subject: [PATCH] create hg3 bin/script to keep Py2 & Py3 mercurial
|
|
installable..
|
|
|
|
This can be removed completely once the mercurial for Python2 is
|
|
removed
|
|
---
|
|
setup.py | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 99556ce..5e30421 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -207,6 +207,8 @@ def write_if_changed(path, content):
|
|
fh.write(content)
|
|
|
|
scripts = ['hg']
|
|
+if 'HGPYTHON3' in os.environ:
|
|
+ scripts = ['hg3']
|
|
if os.name == 'nt':
|
|
# We remove hg.bat if we are able to build hg.exe.
|
|
scripts.append('contrib/win32/hg.bat')
|
|
@@ -311,6 +313,8 @@ def findhg():
|
|
hgenv['HGPLAIN'] = '1'
|
|
hgenv['LANGUAGE'] = 'C'
|
|
hgcmd = ['hg']
|
|
+ if 'HGPYTHON3' in os.environ:
|
|
+ hgcmd = ['hg3']
|
|
# 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.21.0
|
|
|