This is a conservative version of SF patch 504889. It uses the log
module instead of calling print in various places, and it ignores the
verbose argument passed to many functions and set as an attribute on
some objects. Instead, it uses the verbosity set on the logger via
the command line.
The log module is now preferred over announce() and warn() methods
that exist only for backwards compatibility.
XXX This checkin changes a lot of modules that have no test suite and
aren't exercised by the Python build process. It will need
substantial testing.
families" -- eg. install and its brood, build and its brood, and so forth.
Specifically: added the 'sub_commands' class attribute (empty list, sub-
classes must override it) and a comment describing it, and the
'get_sub_commands()' method.
* Command method 'find_peer()' -> 'get_finalized_command()'
* Command method 'run_peer()' -> 'run_command()'
Also deleted the 'get_command_option()' method from Command, and
fixed the one place where it was used (in "bdist_dumb").
- renamed '_copydata()' to 'copy_files()'
- changed it to record complete output filenames
- dropped '_outputdata()' in favour of much simpler 'get_outputs()'
adds the 'install_data' and 'install_scripts' commands; these two
are trivial thanks to the 'install_misc' base class in cmd.py.
(Minor tweaks and commentary by me; the code is untested so far.)
- DistutilsOptionError is now documented as it's actually used, ie.
to indicate bogus option values (usually user options, eg. from
the command-line)
- added DistutilsSetupError to indicate errors that definitely arise
in the setup script
- got rid of DistutilsValueError, and changed all usage of it to
either DistutilsSetupError or ValueError as appropriate
- simplified a bunch of option get/set methods in Command and
Distribution classes -- just pass on AttributeError most of
the time, rather than turning it into something else
crashing when self.force not defined.
Revise 'copy_file()' and 'copy_tree()' docstrings accordingly.
Remove 'hasattr()' check for 'self.force' from 'make_file()'.
to all commands in the same way. Several Command methods now either expect
'self.force' to be defined, or check if it is defined and assume it's
false if not.
the Command class from core.py to cmd.py. No other code needs changing
though; distutils.core still provides the Command and Distribution classes,
although indirectly now.