summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/core.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added some debuging output (actually moved here from dist.py) --Greg Ward2000-05-231-0/+8
| | | | | dump the Distribution's 'command_options' dict after parsing config files, and then after parsing the command line.
* Tweaked usage message.Greg Ward2000-05-231-2/+2
|
* Call 'parse_config_files()' at the appropriate point.Gregory P. Smith2000-05-121-7/+7
| | | | Tweaked error-generating code.
* Merged in code from the 0.1.5 release to handle IOError and OSErrorGreg Ward2000-04-221-6/+12
| | | | exceptions better.
* Catch DistutilsOptionError in 'setup()' -- it's thrown either because ofGreg Ward2000-04-221-1/+3
| | | | | errors in the setup script or on the command line, so shouldn't result in a traceback.
* Catch DistutilsFileError in addition to DistutilsExecError in 'setup()'.Greg Ward2000-04-091-1/+1
|
* Reorganization: moved the Distribution class from core.py to dist.py, andGreg Ward2000-04-041-933/+6
| | | | | | 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.
* Added 'get_name()' and 'get_full_name()' methods to Distribution.Greg Ward2000-03-311-2/+16
| | | | | | | | Simplified 'Command.get_peer_option()' a tad -- just call 'find_peer()' to get the peer command object. Updated 'Command.copy_file()' to take a 'link' parameter, just like 'util.copy_file()' does now. Added 'Command.make_archive()' to wrap 'util.make_archive()'.
* Added the "distribution query" methods: 'has_pure_modules()',Greg Ward2000-03-291-2/+22
| | | | 'has_ext_modules()', 'has_c_libraries()', 'has_modules()', and 'is_pure()'.
* Beefed up error-handling in 'setup()' a smidge:Greg Ward2000-03-261-1/+3
| | | | handle OSError and DistutilsExecError now.
* Dropped the evil and misguided 'set_peer_option()' method -- it's noGreg Ward2000-03-221-20/+0
| | | | longer needed, and can't possibly work anyways.
* Renamed 'install_path' to 'extra_path'.Greg Ward2000-03-221-2/+6
| | | | | | | | Fix 'Command.set_undefined_option()' to call 'ensure_ready()' rather than 'finalize_options()' (which is only supposed to be called once, which is the whole point of 'ensure_ready()'). Added comment to 'set_peer_option()' to remind myself that this method cannot work and is fundamentally wrong-headed.
* Oops! Don't call 'ensure_ready()' in 'Distribution.find_command_obj()' --Greg Ward2000-03-181-2/+3
| | | | | | that broke parsing command-line options. Instead call it in 'Command.find_peer()', which is why I added it to 'find_command_obj()' in the first place.
* Changed '__rcsid__' to '__revision__'.Greg Ward2000-03-021-1/+1
|
* Added call to 'ensure_ready()' on the command object inGreg Ward2000-03-011-0/+1
| | | | 'Distribution.find_command_obj()'.
* Try to deal with pre-1.5.2 IOError exception objects.Greg Ward2000-02-261-2/+6
|
* Changed all references to command methods 'set_default_options()' andGreg Ward2000-02-181-23/+23
| | | | 'set_final_options()' to 'initialize_options()' and 'finalize_options()'.
* Changed references to the command class 'options' attribute to 'user_options'.Greg Ward2000-02-181-26/+27
| | | | | Related docstring changes. Unrelated comment changes.
* Command classes are now named identically to their commands, so reflect thisGreg Ward2000-02-181-2/+1
| | | | in 'find_command_class()' method.
* Added 'libraries' option for use by the 'build_lib' command.Greg Ward2000-02-051-1/+2
| | | | Typo fix.
* Improvements to the help system:Greg Ward2000-01-301-5/+89
| | | | | | | | * "--help" can now come either before or after particular commands to get help on and can give help on multiple commands, eg. "--help install dist" gives help on those two commands * added "--help-commands" option, implemented by the 'print_commands()' and 'print_command_list()' methods
* When emitting a command-line error message, *say* it's an error.Greg Ward1999-12-161-1/+1
|
* Made "verbose" mode the default; now you have to supply --quiet if youGreg Ward1999-12-121-18/+75
| | | | | | | | | | | | | | | | | | | | | | | want no output. Still no option for a happy medium though. Added "--help" global option. Changed 'parse_command_line()' to recognize help options (both for the whole distribution and per-command), and to distinguish "regular run" and "user asked for help" by returning false in the latter case. Also in 'parse_command_line()', detect invalid command name on command line by catching DistutilsModuleError. a 'negative_opt' class attribute right after 'global_options'; changed how we call 'fancy_getopt()' accordingly. Initialize 'maintainer' and 'maintainer_email' attributes to Distribution to avoid AttributeError when 'author' and 'author_email' not defined. Initialize 'help' attribute in Command constructor (to avoid AttributeError when user *doesn't* ask for help). In 'setup()': * show usage message before dying when we catch DistutilsArgError * only run commands if 'parse_command_line()' returned true (that way, we exit immediately when a help option is found) * catch KeyboardInterrupt and IOError from running commands Bulked up usage message to show --help options. Comment, docstring, and error message tweaks.
* Qualified use of 'newer_group' function.Greg Ward1999-10-231-1/+1
|
* Added 'force' and 'quiet' (negative alias for 'verbose') to theGreg Ward1999-10-031-83/+84
| | | | | | | | | | | | | | | | | | global options table. Every Command instance now has its own copies of the global options, which automatically fallback to the Distribution instance. Changes: - initialize them in constructor - added '__getattr__()' to handle the fallback logic - changed every 'self.distribution.{verbose,dry_run}' in Command to 'self.{verbose,dry_run}'. - filesystem utility methods ('copy_file()' et al) don't take 'update' parameter anymore -- instead we pass 'not force' to the underlying function as 'update' Changed parsing of command line so that global options apply to all commands as well -- that's how (eg.) Command.verbose will be initialized. Simplified 'make_file()' to use 'newer_group()' (from util module). Deleted some cruft. Some docstring tweaks.
* Added 'ready' flag and 'ensure_ready()' method to Command: togetherGreg Ward1999-09-291-28/+53
| | | | | | | | | they make sure that 'set_final_options()' has been called, but isn't called redundantly. Changed Distribution to call 'ensure_ready()' where it used to call 'set_final_options()', and in a few extra places as well. Lots of comment/docstring revisions and additions in both classes. New one-liner utility methods in Command: 'find_peer()', 'spawn()'.
* Ditched the whole notion of "alias options": this meant dropping theGreg Ward1999-09-211-39/+21
| | | | | | | | | | | | | 'alias_options' table and getting rid of some hairy code in the Distribution constructor. Resurrected the distribution options that describe the modules present in the module distribution ('py_modules', 'ext_modules'), and added a bunch more: 'packages', 'package_dir', 'ext_package', 'include_dirs', 'install_path'. Updated some comments. Added 'warn()' method to Command. 'Command.get_command_name()' now stores generated command name in self.command_name.
* Fixed some goofs in 'alias_options'.Greg Ward1999-09-131-2/+15
| | | | | | Error message tweak in Command.set_option(). Added Command.get_peer_option(). Added Command.move_file() wrapper.
* Careful rethink of command options, distribution options, distributionGreg Ward1999-09-081-26/+108
| | | | | | | | | | | | | | | attributes, etc. Biggest change was to the Distribution constructor -- it now looks for an 'options' attribute, which contains values (options) that are explicitly farmed out to the commands. Also, certain options supplied to Distribution (ie. in the 'setup()' call in setup.py) are now "command option aliases", meaning they are dropped right into a certain command rather than being distribution options. This is handled by a new Distribution class attribute, 'alias_options'. Various comment changes to reflect the new way-of-thinking. Added 'get_command_name()' method to Command -- was assuming its existence all along as 'command_name()', so changed the code that needs it to call 'get_command_name()'.
* Patch from Perry Stoll: import types module.Greg Ward1999-08-291-0/+1
|
* Comment tweak.Greg Ward1999-08-141-5/+5
|
* Added the 'have_run' dictionary to Distribution, and changedGreg Ward1999-06-081-3/+33
| | | | | | | 'run_command()' to refer to it before attempting to run a command -- that way, command classes can freely invoke other commands without fear of duplicate execution. Beefed up some comments and docstrings.
* The 'copy_file()' and 'copy_tree()' functions in util.py now haveGreg Ward1999-05-021-8/+8
| | | | | | | meaningful return values: respectively, whether the copy was done, and the list of files that were copied. This meant some trivial changes in core.py as well: the Command methods that mirror 'copy_file()' and 'copy_tree()' have to pass on their return values.
* Added all the "external action" methods (to make handling the verboseGreg Ward1999-04-041-1/+131
| | | | | | and dry-run flags consistently painless): 'execute()', 'mkpath()', 'copy_file()', 'copy_tree()', 'make_file()', and stub for 'make_files()' (not sure yet if it's useful).
* First checkin of real Distutils code.Greg Ward1999-03-221-0/+597