diff contrib/automation/hgautomation/cli.py @ 48846:d7e064d509a0

automation: drop support for Python 2.7 in Windows environment We stop installing Python 2.7 in the Windows environment. We remove support for building Python 2.7 wheels and installers. There is still some Python 2.7 support cleanup to perform in automation. But this removes the biggest remaining chunk of references to 2.7. Differential Revision: https://phab.mercurial-scm.org/D12263
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Feb 2022 18:42:31 -0700
parents 5c8148cd7f13
children 4561ec90d3c1
line wrap: on
line diff
--- a/contrib/automation/hgautomation/cli.py	Sat Feb 19 18:18:35 2022 -0700
+++ b/contrib/automation/hgautomation/cli.py	Sat Feb 19 18:42:31 2022 -0700
@@ -158,7 +158,7 @@
 
         windows.synchronize_hg(SOURCE_ROOT, revision, instance)
 
-        for py_version in ("2.7", "3.7", "3.8", "3.9", "3.10"):
+        for py_version in ("3.7", "3.8", "3.9", "3.10"):
             for arch in ("x86", "x64"):
                 windows.purge_hg(winrm_client)
                 windows.build_wheel(
@@ -342,7 +342,7 @@
     sp.add_argument(
         '--python-version',
         help='Which version of Python to target',
-        choices={2, 3},
+        choices={3},
         type=int,
         nargs='*',
         default=[3],
@@ -377,7 +377,7 @@
     sp.add_argument(
         '--python-version',
         help='Python version to build for',
-        choices={'2.7', '3.7', '3.8', '3.9', '3.10'},
+        choices={'3.7', '3.8', '3.9', '3.10'},
         nargs='*',
         default=['3.8'],
     )
@@ -404,7 +404,7 @@
     sp.add_argument(
         '--python-version',
         help='Which version of Python to target',
-        choices={2, 3},
+        choices={3},
         type=int,
         nargs='*',
         default=[3],
@@ -499,8 +499,8 @@
     sp.add_argument(
         '--python-version',
         help='Python version to use',
-        choices={'2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10'},
-        default='2.7',
+        choices={'3.5', '3.6', '3.7', '3.8', '3.9', '3.10'},
+        default='3.9',
     )
     sp.add_argument(
         '--arch',