From 0451d00cd83f74d0a42c5a9d6e942041806aa7d8 Mon Sep 17 00:00:00 2001 From: Guinness Date: Sat, 22 Jan 2022 16:37:36 +0100 Subject: [PATCH] Allow overriding SETUPTOOLS_USE_DISTUTILS --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1daa7438..d2896f68 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,8 @@ # the deprecation warning. Must be done before importing setuptools, # setuptools also must be imported before distutils. # https://github.com/pypa/setuptools/blob/main/docs/deprecated/distutils-legacy.rst -os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'local' +if 'SETUPTOOLS_USE_DISTUTILS' not in os.environ: + os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'local' from setuptools import setup # noqa: E402 from setuptools import Distribution # noqa: E402