Patchwork D9722: setup: don't import distutils prior to checking FORCE_SETUPTOOLS

login
register
mail settings
Submitter phabricator
Date Jan. 12, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-pptsp7u5bcxcjlbnrxxc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48034/
State Superseded
Headers show

Comments

phabricator - Jan. 12, 2021, 12:07 p.m.
danchr created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I've seen warnings about importing distutils before setuptools,
  although I can't reproduce them at the moment.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9722

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: danchr, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -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
@@ -200,6 +199,7 @@ 
 from distutils.command.install_data import install_data
 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 (