diff options
-rwxr-xr-x | setuptools/sandbox.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 9c4ff336..4711fec2 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -7,6 +7,7 @@ import itertools import re import contextlib import pickle +import textwrap import six from six.moves import builtins, map @@ -476,13 +477,17 @@ WRITE_FLAGS = functools.reduce( class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" - def __str__(self): - return """SandboxViolation: %s%r %s + tmpl = textwrap.dedent(""" + SandboxViolation: %s%r %s + + The package setup script has attempted to modify files on your system + that are not within the EasyInstall build area, and has been aborted. -The package setup script has attempted to modify files on your system -that are not within the EasyInstall build area, and has been aborted. + This package cannot be safely installed by EasyInstall, and may not + support alternate installation locations even if you run its setup + script by hand. Please inform the package's author and the EasyInstall + maintainers to find out if a fix or workaround is available. + """).lstrip() -This package cannot be safely installed by EasyInstall, and may not -support alternate installation locations even if you run its setup -script by hand. Please inform the package's author and the EasyInstall -maintainers to find out if a fix or workaround is available.""" % self.args + def __str__(self): + return self.tmpl % self.args |