aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:53:31 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-07-26 12:51:58 -0400
commit1251a231ad75fa649da700645690eb3c0a348f08 (patch)
tree408ad30563d3d86691e1f5928c4b831298ccba6b
parent83a85a71cd779b1b1b3a44e21cc198264650da46 (diff)
downloadexternal_python_setuptools-1251a231ad75fa649da700645690eb3c0a348f08.tar.gz
external_python_setuptools-1251a231ad75fa649da700645690eb3c0a348f08.tar.bz2
external_python_setuptools-1251a231ad75fa649da700645690eb3c0a348f08.zip
Replace install behavior on import with direct invocation (now that 'enabled' logic is duplicated in pth file).
-rw-r--r--_distutils_hack/install.py5
-rwxr-xr-xsetup.py2
2 files changed, 1 insertions, 6 deletions
diff --git a/_distutils_hack/install.py b/_distutils_hack/install.py
deleted file mode 100644
index 73f13b29..00000000
--- a/_distutils_hack/install.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from . import enabled, add_shim
-
-
-if enabled():
- add_shim()
diff --git a/setup.py b/setup.py
index 2e44225e..37953051 100755
--- a/setup.py
+++ b/setup.py
@@ -100,7 +100,7 @@ class install_with_pth(install):
_pth_contents = textwrap.dedent("""
import os
enabled = os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'local'
- enabled and __import__('_distutils_hack.install')
+ enabled and __import__('_distutils_hack').add_shim()
""").lstrip().replace('\n', '; ')
def initialize_options(self):