diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:51:40 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 12:51:35 -0400 |
commit | 83a85a71cd779b1b1b3a44e21cc198264650da46 (patch) | |
tree | 6caa617da5febab2a3d2071379bc3e980d37aa83 /setup.py | |
parent | 5642e413fb6c75434f109be943bdb09ea9e7ade2 (diff) | |
download | external_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-x | setup.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |