equal
deleted
inserted
replaced
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 |
6 |
|
7 import os |
|
8 |
7 supportedpy = '~= 2.7' |
9 supportedpy = '~= 2.7' |
8 if 'HGALLOWPYTHON3': |
10 if os.environ.get('HGALLOWPYTHON3', ''): |
9 # Mercurial will never work on Python 3 before 3.5 due to a lack |
11 # 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 |
12 # 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. |
13 # due to a bug in % formatting in bytestrings. |
12 # |
14 # |
13 # TODO: when we actually work on Python 3, use this string as the |
15 # TODO: when we actually work on Python 3, use this string as the |
99 "Couldn't import standard bz2 (incomplete Python install).") |
101 "Couldn't import standard bz2 (incomplete Python install).") |
100 |
102 |
101 ispypy = "PyPy" in sys.version |
103 ispypy = "PyPy" in sys.version |
102 |
104 |
103 import ctypes |
105 import ctypes |
104 import os, stat, subprocess, time |
106 import stat, subprocess, time |
105 import re |
107 import re |
106 import shutil |
108 import shutil |
107 import tempfile |
109 import tempfile |
108 from distutils import log |
110 from distutils import log |
109 # We have issues with setuptools on some platforms and builders. Until |
111 # We have issues with setuptools on some platforms and builders. Until |