comparison setup.py @ 48824:a6970465e026

setup: remove block that tries to help Python 2.6 users It's time to move on folks. Differential Revision: https://phab.mercurial-scm.org/D12268
author Augie Fackler <augie@google.com>
date Wed, 02 Mar 2022 10:05:45 -0500
parents 9af9e2d54857
children 726b3601a534
comparison
equal deleted inserted replaced
48823:9af9e2d54857 48824:a6970465e026
38 f.write(b' '.join(args) + end) 38 f.write(b' '.join(args) + end)
39 39
40 def sysstr(s): 40 def sysstr(s):
41 return s 41 return s
42 42
43
44 # Attempt to guide users to a modern pip - this means that 2.6 users
45 # should have a chance of getting a 4.2 release, and when we ratchet
46 # the version requirement forward again hopefully everyone will get
47 # something that works for them.
48 if sys.version_info < (2, 7, 4, 'final'):
49 pip_message = (
50 'This may be due to an out of date pip. '
51 'Make sure you have pip >= 9.0.1.'
52 )
53 try:
54 import pip
55
56 pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]])
57 if pip_version < (9, 0, 1):
58 pip_message = (
59 'Your pip version is out of date, please install '
60 'pip >= 9.0.1. pip {} detected.'.format(pip.__version__)
61 )
62 else:
63 # pip is new enough - it must be something else
64 pip_message = ''
65 except Exception:
66 pass
67 error = """
68 Mercurial does not support Python older than 2.7.4.
69 Python {py} detected.
70 {pip}
71 """.format(
72 py=sys.version_info, pip=pip_message
73 )
74 printf(error, file=sys.stderr)
75 sys.exit(1)
76 43
77 import ssl 44 import ssl
78 45
79 try: 46 try:
80 ssl.SSLContext 47 ssl.SSLContext