equal
deleted
inserted
replaced
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 from __future__ import print_function |
|
7 |
|
8 import os |
6 import os |
9 |
7 |
10 # Mercurial will never work on Python 3 before 3.5 due to a lack |
8 # Mercurial will never work on Python 3 before 3.5 due to a lack |
11 # of % formatting on bytestrings, and can't work on 3.6.0 or 3.6.1 |
9 # of % formatting on bytestrings, and can't work on 3.6.0 or 3.6.1 |
12 # due to a bug in % formatting in bytestrings. |
10 # due to a bug in % formatting in bytestrings. |
141 hgrustext = os.environ.get('HGWITHRUSTEXT') |
139 hgrustext = os.environ.get('HGWITHRUSTEXT') |
142 # TODO record it for proper rebuild upon changes |
140 # TODO record it for proper rebuild upon changes |
143 # (see mercurial/__modulepolicy__.py) |
141 # (see mercurial/__modulepolicy__.py) |
144 if hgrustext != 'cpython' and hgrustext is not None: |
142 if hgrustext != 'cpython' and hgrustext is not None: |
145 if hgrustext: |
143 if hgrustext: |
146 print('unkown HGWITHRUSTEXT value: %s' % hgrustext, file=sys.stderr) |
144 printf('unkown HGWITHRUSTEXT value: %s' % hgrustext, file=sys.stderr) |
147 hgrustext = None |
145 hgrustext = None |
148 |
146 |
149 import ctypes |
147 import ctypes |
150 import errno |
148 import errno |
151 import stat, subprocess, time |
149 import stat, subprocess, time |