Mercurial > hg
comparison setup.py @ 46233:172b294b6d65
setup: don't import distutils prior to checking FORCE_SETUPTOOLS
I've seen warnings about importing distutils before setuptools,
although I can't reproduce them at the moment.
Differential Revision: https://phab.mercurial-scm.org/D9722
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Mon, 11 Jan 2021 13:48:13 +0100 |
parents | 3158522085f0 |
children | 63c923fd7fa8 |
comparison
equal
deleted
inserted
replaced
46232:eb01d6d00a50 | 46233:172b294b6d65 |
---|---|
177 import errno | 177 import errno |
178 import stat, subprocess, time | 178 import stat, subprocess, time |
179 import re | 179 import re |
180 import shutil | 180 import shutil |
181 import tempfile | 181 import tempfile |
182 from distutils import log | |
183 | 182 |
184 # We have issues with setuptools on some platforms and builders. Until | 183 # We have issues with setuptools on some platforms and builders. Until |
185 # those are resolved, setuptools is opt-in except for platforms where | 184 # those are resolved, setuptools is opt-in except for platforms where |
186 # we don't have issues. | 185 # we don't have issues. |
187 issetuptools = os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ | 186 issetuptools = os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ |
197 from distutils.command.build_py import build_py | 196 from distutils.command.build_py import build_py |
198 from distutils.command.build_scripts import build_scripts | 197 from distutils.command.build_scripts import build_scripts |
199 from distutils.command.install import install | 198 from distutils.command.install import install |
200 from distutils.command.install_lib import install_lib | 199 from distutils.command.install_lib import install_lib |
201 from distutils.command.install_scripts import install_scripts | 200 from distutils.command.install_scripts import install_scripts |
201 from distutils import log | |
202 from distutils.spawn import spawn, find_executable | 202 from distutils.spawn import spawn, find_executable |
203 from distutils import file_util | 203 from distutils import file_util |
204 from distutils.errors import ( | 204 from distutils.errors import ( |
205 CCompilerError, | 205 CCompilerError, |
206 DistutilsError, | 206 DistutilsError, |