aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:51:40 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-07-26 12:51:35 -0400
commit83a85a71cd779b1b1b3a44e21cc198264650da46 (patch)
tree6caa617da5febab2a3d2071379bc3e980d37aa83 /setup.py
parent5642e413fb6c75434f109be943bdb09ea9e7ade2 (diff)
downloadexternal_python_setuptools-83a85a71cd779b1b1b3a44e21cc198264650da46.tar.gz
external_python_setuptools-83a85a71cd779b1b1b3a44e21cc198264650da46.tar.bz2
external_python_setuptools-83a85a71cd779b1b1b3a44e21cc198264650da46.zip
Restore early opt-in/opt-out for pth behavior.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 6f6601fe..2e44225e 100755
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,7 @@ Distutils setup file, used to install or test 'setuptools'
import os
import sys
+import textwrap
import setuptools
from setuptools.command.install import install
@@ -96,7 +97,11 @@ class install_with_pth(install):
"""
_pth_name = 'distutils-precedence'
- _pth_contents = 'import _distutils_hack.install'
+ _pth_contents = textwrap.dedent("""
+ import os
+ enabled = os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'local'
+ enabled and __import__('_distutils_hack.install')
+ """).lstrip().replace('\n', '; ')
def initialize_options(self):
install.initialize_options(self)