annotate Lib/distutils/errors.py @ 70817:dd775b1561ba

Fix markup.
author Georg Brandl <georg@python.org>
date Tue, 14 Jun 2011 21:09:55 +0200
parents 29a3eda89995
children 3e26c9033306
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
1 """distutils.errors
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
2
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
3 Provides exceptions used by the Distutils modules. Note that Distutils
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
4 modules may raise standard exceptions; in particular, SystemExit is
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
5 usually raised for errors that are obviously the end-user's fault
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
6 (eg. bad command-line arguments).
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
7
26207
ffec67409140 Fix docstring typo; remove 'created' line
Andrew M. Kuchling <amk@amk.ca>
parents: 13750
diff changeset
8 This module is safe to use in "from ... import *" mode; it only exports
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
9 symbols whose names start with "Distutils" and end with "Error"."""
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
10
11897
017e592c0fd2 Changed '__rcsid__' to '__revision__'.
Greg Ward <gward@python.net>
parents: 11193
diff changeset
11 __revision__ = "$Id$"
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
12
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
13 class DistutilsError (Exception):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
14 """The root of all Distutils evil."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
15 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
16
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
17 class DistutilsModuleError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
18 """Unable to load an expected module, or to find an expected class
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
19 within some module (in particular, command modules and classes)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
20 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
21
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
22 class DistutilsClassError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
23 """Some command class (or possibly distribution class, if anyone
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
24 feels a need to subclass Distribution) is found not to be holding
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
25 up its end of the bargain, ie. implementing some part of the
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
26 "command "interface."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
27 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
28
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
29 class DistutilsGetoptError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
30 """The option table provided to 'fancy_getopt()' is bogus."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
31 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
32
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
33 class DistutilsArgError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
34 """Raised by fancy_getopt in response to getopt.error -- ie. an
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
35 error in the command line usage."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
36 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
37
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
38 class DistutilsFileError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
39 """Any problems in the filesystem: expected file not found, etc.
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
40 Typically this is for problems that we detect before IOError or
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
41 OSError could be raised."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
42 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
43
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
44 class DistutilsOptionError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
45 """Syntactic/semantic errors in command options, such as use of
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
46 mutually conflicting options, or inconsistent options,
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
47 badly-spelled values, etc. No distinction is made between option
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
48 values originating in the setup script, the command line, config
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
49 files, or what-have-you -- but if we *know* something originated in
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
50 the setup script, we'll raise DistutilsSetupError instead."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
51 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
52
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
53 class DistutilsSetupError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
54 """For errors that can be definitely blamed on the setup script,
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
55 such as invalid keyword arguments to 'setup()'."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
56 pass
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
57
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
58 class DistutilsPlatformError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
59 """We don't know how to do something on the current platform (but
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
60 we do know how to do it on some platform) -- eg. trying to compile
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
61 C files on a platform not supported by a CCompiler subclass."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
62 pass
11115
dcc09228a3d2 Don't pollute importer's namespace with type objects from types modules.
Greg Ward <gward@python.net>
parents: 10435
diff changeset
63
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
64 class DistutilsExecError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
65 """Any problems executing an external program (such as the C
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
66 compiler, when compiling C files)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
67 pass
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
68
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
69 class DistutilsInternalError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
70 """Internal inconsistencies or impossibilities (obviously, this
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
71 should never be seen if the code is working!)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
72 pass
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
73
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
74 class DistutilsTemplateError (DistutilsError):
13750
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
75 """Syntax error in a file list template."""
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
76
56741
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
77 class DistutilsByteCompileError(DistutilsError):
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
78 """Byte compile error."""
12157
be2f003d47cc Added DistutilsInternalError.
Greg Ward <gward@python.net>
parents: 11897
diff changeset
79
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
80 # Exception classes used by the CCompiler implementation classes
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
81 class CCompilerError (Exception):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
82 """Some compile/link operation failed."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
83
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
84 class PreprocessError (CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
85 """Failure to preprocess one or more C/C++ files."""
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
86
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
87 class CompileError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
88 """Failure to compile one or more C/C++ source files."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
89
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
90 class LibError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
91 """Failure to create a static library from one or more C/C++ object
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
92 files."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
93
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
94 class LinkError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
95 """Failure to link one or more C/C++ object files into an executable
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
96 or shared library file."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
97
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
98 class UnknownFileError (CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
99 """Attempt to process an unknown file type."""