diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-03-30 13:28:18 +0100 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-03-30 13:28:18 +0100 |
commit | 292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d (patch) | |
tree | eb3b579630e2c192b2dca1e913eee417af7ad9d3 /setuptools/command/install.py | |
parent | 359dcd429be8857202ebcfa5b85686b032414759 (diff) | |
download | python-setuptools-git-292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d.tar.gz |
Allow install to proceed with an egg install on IronPython and any other environment that has no stack support. Fixes #177.3.4
Diffstat (limited to 'setuptools/command/install.py')
-rw-r--r-- | setuptools/command/install.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/setuptools/command/install.py b/setuptools/command/install.py index f52423f4..1681617f 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,6 +1,8 @@ import setuptools import inspect import glob +import warnings +import platform from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -66,8 +68,16 @@ class install(_install): 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been - called by 'run_commands'. Return True in that case or False otherwise. + called by 'run_commands'. Return True in that case or if a call stack + is unavailable. Return False otherwise. """ + if run_frame is None: + msg = "Call stack not available. bdist_* commands may fail." + warnings.warn(msg) + if platform.python_implementation() == 'IronPython': + 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) |