Mercurial > public > mercurial-scm > hg
comparison setup.py @ 52321:dd8e7d4fe8c3
setup_py: imports standard lib at the top
author | paugier <pierre.augier@univ-grenoble-alpes.fr> |
---|---|
date | Sat, 23 Nov 2024 06:07:40 +0100 |
parents | ad23dc96e7d6 |
children | 40f649592ba9 |
comparison
equal
deleted
inserted
replaced
52320:ad23dc96e7d6 | 52321:dd8e7d4fe8c3 |
---|---|
1 # This is the mercurial setup script. | 1 # This is the mercurial setup script. |
2 | 2 |
3 import ctypes | |
3 import os | 4 import os |
5 import re | |
6 import shutil | |
7 import ssl | |
8 import stat | |
9 import subprocess | |
4 import sys | 10 import sys |
5 import sysconfig | 11 import sysconfig |
6 import ssl | 12 import tempfile |
13 import time | |
7 | 14 |
8 if not ssl.HAS_TLSv1_2: | 15 if not ssl.HAS_TLSv1_2: |
9 error = """ | 16 error = """ |
10 The `ssl` module does not advertise support for TLS 1.2. | 17 The `ssl` module does not advertise support for TLS 1.2. |
11 Please make sure that your Python installation was compiled against an OpenSSL | 18 Please make sure that your Python installation was compiled against an OpenSSL |
49 raise SystemExit( | 56 raise SystemExit( |
50 "Couldn't import standard bz2 (incomplete Python install)." | 57 "Couldn't import standard bz2 (incomplete Python install)." |
51 ) | 58 ) |
52 | 59 |
53 ispypy = "PyPy" in sys.version | 60 ispypy = "PyPy" in sys.version |
54 | |
55 import ctypes | |
56 import stat, subprocess, time | |
57 import re | |
58 import shutil | |
59 import tempfile | |
60 | 61 |
61 # We have issues with setuptools on some platforms and builders. Until | 62 # We have issues with setuptools on some platforms and builders. Until |
62 # those are resolved, setuptools is opt-in except for platforms where | 63 # those are resolved, setuptools is opt-in except for platforms where |
63 # we don't have issues. | 64 # we don't have issues. |
64 issetuptools = os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ | 65 issetuptools = os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ |