annotate Lib/distutils/errors.py @ 58765:2ba7677bfa95 legacy-trunk

testCopysign was defined twice in test_math; combine the definitions
author Mark Dickinson <dickinsm@gmail.com>
date Sat, 06 Feb 2010 23:11:25 +0000
parents ef6ab5d0a006
children b36cb4602e21 29a3eda89995
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
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
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."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
15
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
16 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
17 """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
18 within some module (in particular, command modules and classes)."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
19
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
20 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
21 """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
22 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
23 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
24 "command "interface."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
25
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
26 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
27 """The option table provided to 'fancy_getopt()' is bogus."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
28
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
29 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
30 """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
31 error in the command line usage."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
32
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
33 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
34 """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
35 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
36 OSError could be raised."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
37
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
38 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
39 """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
40 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
41 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
42 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
43 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
44 the setup script, we'll raise DistutilsSetupError instead."""
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
45
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
46 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
47 """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
48 such as invalid keyword arguments to 'setup()'."""
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
49
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
50 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
51 """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
52 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
53 C files on a platform not supported by a CCompiler subclass."""
11115
dcc09228a3d2 Don't pollute importer's namespace with type objects from types modules.
Greg Ward <gward@python.net>
parents: 10435
diff changeset
54
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
55 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
56 """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
57 compiler, when compiling C files)."""
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
58
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
59 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
60 """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
61 should never be seen if the code is working!)."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
62
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
63 class DistutilsTemplateError(DistutilsError):
13750
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
64 """Syntax error in a file list template."""
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
65
56741
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
66 class DistutilsByteCompileError(DistutilsError):
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
67 """Byte compile error."""
12157
be2f003d47cc Added DistutilsInternalError.
Greg Ward <gward@python.net>
parents: 11897
diff changeset
68
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
69 # Exception classes used by the CCompiler implementation classes
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
70 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
71 """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
72
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
73 class PreprocessError(CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
74 """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
75
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
76 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
77 """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
78
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
79 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
80 """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
81 files."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
82
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
83 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
84 """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
85 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
86
56933
ef6ab5d0a006 Merged revisions 75901 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56741
diff changeset
87 class UnknownFileError(CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
88 """Attempt to process an unknown file type."""