summaryrefslogtreecommitdiff
path: root/setuptools/command/install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-05-09 10:42:04 -0400
committerJason R. Coombs <jaraco@jaraco.com>2022-05-09 10:42:56 -0400
commit9116c7eb52504bec77d26881d2c28e427dc52143 (patch)
tree6becb88401eb15bdff6fc924211894e6d9c277d1 /setuptools/command/install.py
parent8d12d6196c369c7cf0164a1202e968dd68a2cb6c (diff)
parente009a87b5578cb16099b697ba8395c8f6bdd70f3 (diff)
downloadpython-setuptools-git-debt/remove-easy-install.tar.gz
Merge branch 'main' into debt/remove-easy-installdebt/remove-easy-install
Diffstat (limited to 'setuptools/command/install.py')
-rw-r--r--setuptools/command/install.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/setuptools/command/install.py b/setuptools/command/install.py
index 35e54d20..55fdb124 100644
--- a/setuptools/command/install.py
+++ b/setuptools/command/install.py
@@ -91,14 +91,21 @@ class install(orig.install):
msg = "For best results, pass -X:Frames to enable call stack."
warnings.warn(msg)
return True
- res = inspect.getouterframes(run_frame)[2]
- caller, = res[:1]
- info = inspect.getframeinfo(caller)
- caller_module = caller.f_globals.get('__name__', '')
- return (
- caller_module == 'distutils.dist'
- and info.function == 'run_commands'
- )
+
+ frames = inspect.getouterframes(run_frame)
+ for frame in frames[2:4]:
+ caller, = frame[:1]
+ info = inspect.getframeinfo(caller)
+ caller_module = caller.f_globals.get('__name__', '')
+
+ if caller_module == "setuptools.dist" and info.function == "run_command":
+ # Starting from v61.0.0 setuptools overwrites dist.run_command
+ continue
+
+ return (
+ caller_module == 'distutils.dist'
+ and info.function == 'run_commands'
+ )
def do_egg_install(self):