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
--- 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 (