Mercurial > hg-stable
comparison setup.py @ 33587:e0bbe32d8b55 stable
setup: explicitly declare supported Python versions
I think we should probably backport this to 4.2 as well, and do one
more release there that explicitly declares 2.6 support. That way
anyone stuck on Python 2.6 will end up getting the right hg if they
use a modern pip to install. Users can still use `python setup.py`
incantations to attempt installing Mercurial on unsupported Pythons,
including 3.5 and 3.6.
A followup change will switch to only doing our own
Python-version-check logic if we're not being installed by a
reasonable pip.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 21 Jul 2017 10:39:52 -0400 |
parents | 176030f695ca |
children | 025017423e53 |
comparison
equal
deleted
inserted
replaced
33586:b7304e1cc914 | 33587:e0bbe32d8b55 |
---|---|
1 # | 1 # |
2 # This is the mercurial setup script. | 2 # This is the mercurial setup script. |
3 # | 3 # |
4 # 'python setup.py install', or | 4 # 'python setup.py install', or |
5 # 'python setup.py --help' for more options | 5 # 'python setup.py --help' for more options |
6 | |
7 supportedpy = '~= 2.7' | |
8 if 'HGALLOWPYTHON3': | |
9 # Mercurial will never work on Python 3 before 3.5 due to a lack | |
10 # of % formatting on bytestrings, and can't work on 3.6.0 or 3.6.1 | |
11 # due to a bug in % formatting in bytestrings. | |
12 # | |
13 # TODO: when we actually work on Python 3, use this string as the | |
14 # actual supportedpy string. | |
15 supportedpy = ','.join([ | |
16 '>=2.7', | |
17 '!=3.0.*', | |
18 '!=3.1.*', | |
19 '!=3.2.*', | |
20 '!=3.3.*', | |
21 '!=3.4.*', | |
22 '!=3.6.0', | |
23 '!=3.6.1', | |
24 ]) | |
6 | 25 |
7 import sys, platform | 26 import sys, platform |
8 if sys.version_info < (2, 7, 0, 'final'): | 27 if sys.version_info < (2, 7, 0, 'final'): |
9 raise SystemExit('Mercurial requires Python 2.7 or later.') | 28 raise SystemExit('Mercurial requires Python 2.7 or later.') |
10 | 29 |
890 'license': 'COPYING', | 909 'license': 'COPYING', |
891 'readme': 'contrib/macosx/Readme.html', | 910 'readme': 'contrib/macosx/Readme.html', |
892 'welcome': 'contrib/macosx/Welcome.html', | 911 'welcome': 'contrib/macosx/Welcome.html', |
893 }, | 912 }, |
894 }, | 913 }, |
914 python_requires=supportedpy, | |
895 **extra) | 915 **extra) |