setup: don't import distutils prior to checking FORCE_SETUPTOOLS
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Mon, 11 Jan 2021 13:48:13 +0100
changeset 46233 172b294b6d65
parent 46232 eb01d6d00a50
child 46234 9804162a4053
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
setup.py
--- a/setup.py	Wed Jan 13 15:42:15 2021 +0530
+++ b/setup.py	Mon Jan 11 13:48:13 2021 +0100
@@ -179,7 +179,6 @@
 import re
 import shutil
 import tempfile
-from distutils import log
 
 # We have issues with setuptools on some platforms and builders. Until
 # those are resolved, setuptools is opt-in except for platforms where
@@ -199,6 +198,7 @@
 from distutils.command.install import install
 from distutils.command.install_lib import install_lib
 from distutils.command.install_scripts import install_scripts
+from distutils import log
 from distutils.spawn import spawn, find_executable
 from distutils import file_util
 from distutils.errors import (