Mercurial > cpython-lru_cache-weakref
annotate Lib/distutils/errors.py @ 58925:eecf1bef052d 2.6
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line
#7930: fix stripid
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Tue, 16 Feb 2010 23:29:44 +0000 |
| parents | ac4931ab0369 |
| children | b36cb4602e21 |
| 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 |
|
33965
893d46576737
Update compatibility comments to 2.1, corresponding to PEP 291 1.13.
Martin v. Löwis <martin@v.loewis.de>
parents:
26285
diff
changeset
|
11 # This module should be kept compatible with Python 2.1. |
|
26285
42bfc98d295b
Add comment to Distutil files about requiring 1.5.2 compatibility, as
Andrew M. Kuchling <amk@amk.ca>
parents:
26207
diff
changeset
|
12 |
|
11897
017e592c0fd2
Changed '__rcsid__' to '__revision__'.
Greg Ward <gward@python.net>
parents:
11193
diff
changeset
|
13 __revision__ = "$Id$" |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
14 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
15 class DistutilsError (Exception): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
16 """The root of all Distutils evil.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
17 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
18 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
19 class DistutilsModuleError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
20 """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
|
21 within some module (in particular, command modules and classes).""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
22 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
23 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
24 class DistutilsClassError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
25 """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
|
26 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
|
27 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
|
28 "command "interface.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
29 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
30 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
31 class DistutilsGetoptError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
32 """The option table provided to 'fancy_getopt()' is bogus.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
33 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
34 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
35 class DistutilsArgError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
36 """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
|
37 error in the command line usage.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
38 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
39 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
40 class DistutilsFileError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
41 """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
|
42 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
|
43 OSError could be raised.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
44 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
45 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
46 class DistutilsOptionError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
47 """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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 the setup script, we'll raise DistutilsSetupError instead.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
53 pass |
|
10435
324450ea5450
First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
54 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
55 class DistutilsSetupError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
56 """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
|
57 such as invalid keyword arguments to 'setup()'.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
58 pass |
|
11193
89961b6813ac
Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents:
11115
diff
changeset
|
59 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
60 class DistutilsPlatformError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
61 """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
|
62 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
|
63 C files on a platform not supported by a CCompiler subclass.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
64 pass |
|
11115
dcc09228a3d2
Don't pollute importer's namespace with type objects from types modules.
Greg Ward <gward@python.net>
parents:
10435
diff
changeset
|
65 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
66 class DistutilsExecError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
67 """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
|
68 compiler, when compiling C files).""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
69 pass |
|
11193
89961b6813ac
Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents:
11115
diff
changeset
|
70 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
71 class DistutilsInternalError (DistutilsError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
72 """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
|
73 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
|
74 pass |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
75 |
|
13750
dfdb911cbec2
Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents:
13012
diff
changeset
|
76 class DistutilsTemplateError (DistutilsError): |
|
dfdb911cbec2
Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents:
13012
diff
changeset
|
77 """Syntax error in a file list template.""" |
|
dfdb911cbec2
Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents:
13012
diff
changeset
|
78 |
|
58205
ac4931ab0369
Merged revisions 75669-75671 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
33965
diff
changeset
|
79 class DistutilsByteCompileError(DistutilsError): |
|
ac4931ab0369
Merged revisions 75669-75671 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
33965
diff
changeset
|
80 """Byte compile error.""" |
|
12157
be2f003d47cc
Added DistutilsInternalError.
Greg Ward <gward@python.net>
parents:
11897
diff
changeset
|
81 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
82 # Exception classes used by the CCompiler implementation classes |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
83 class CCompilerError (Exception): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
84 """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
|
85 |
|
13012
9076efac8420
Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents:
12791
diff
changeset
|
86 class PreprocessError (CCompilerError): |
|
9076efac8420
Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents:
12791
diff
changeset
|
87 """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
|
88 |
|
12791
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
89 class CompileError (CCompilerError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
90 """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
|
91 |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
92 class LibError (CCompilerError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
93 """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
|
94 files.""" |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
95 |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
96 class LinkError (CCompilerError): |
|
937f9859c9de
Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents:
12408
diff
changeset
|
97 """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
|
98 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
|
99 |
|
13012
9076efac8420
Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents:
12791
diff
changeset
|
100 class UnknownFileError (CCompilerError): |
|
9076efac8420
Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents:
12791
diff
changeset
|
101 """Attempt to process an unknown file type.""" |
