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 | |
parent | 359dcd429be8857202ebcfa5b85686b032414759 (diff) | |
download | external_python_setuptools-292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d.tar.gz external_python_setuptools-292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d.tar.bz2 external_python_setuptools-292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d.zip |
Allow install to proceed with an egg install on IronPython and any other environment that has no stack support. Fixes #177.3.4
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | setuptools/command/install.py | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 9be3987b..f7340776 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,10 @@ CHANGES * Issue #176: Add parameter to the test command to support a custom test runner: --test-runner or -r. +* Issue #177: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. --- 3.3 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) |