From a8081a19cc48fc285dfd50953bb2c522cb4b8b02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Jun 2020 12:09:39 -0400 Subject: Update setuptools/distutils_patch.py Co-authored-by: Steve Dower --- setuptools/distutils_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index 43b64c0f..1416a7a3 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -22,7 +22,7 @@ def patch_sys_path(): def ensure_local_distutils(): - if 'distutils' in sys.path: + if 'distutils' in sys.modules: raise RuntimeError("Distutils must not be imported before setuptools") with patch_sys_path(): importlib.import_module('distutils') -- cgit v1.2.3