| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
fairly tight control, and the '_setup_stop_after' and '_setup_distribution'
globals to provide the tight control.
This isn't entirely reliable yet: it dies horribly with a NameError on the
example PIL setup script in examples/pil_setup.py (at least with Python
1.5.2; untested with current Python). There's some strangeness going
on with execfile(), but I don't understand it and don't have time
to track it down right now.
|
|
|
|
|
|
|
|
| |
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
'self.distribution.script_name' rather than 'sys.argv[0]'.
|
| |
|
|
|
|
| |
muddling through IOError and OSError exception objects right here.
|
| |
|
|
|
|
| |
do so if DEBUG is true.
|
| |
|
|
|
|
| |
"from distutils.core import" it.
|
| |
|
|
|
|
|
| |
Changed the exception-handling code in 'setup()' to re-raise exceptions
if DEBUG is true.
|
|
|
|
|
| |
dump the Distribution's 'command_options' dict after parsing config files,
and then after parsing the command line.
|
| |
|
|
|
|
| |
Tweaked error-generating code.
|
|
|
|
| |
exceptions better.
|
|
|
|
|
| |
errors in the setup script or on the command line, so shouldn't result
in a traceback.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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()'.
|
|
|
|
| |
'has_ext_modules()', 'has_c_libraries()', 'has_modules()', and 'is_pure()'.
|
|
|
|
| |
handle OSError and DistutilsExecError now.
|
|
|
|
| |
longer needed, and can't possibly work anyways.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
'Distribution.find_command_obj()'.
|
| |
|
|
|
|
| |
'set_final_options()' to 'initialize_options()' and 'finalize_options()'.
|
|
|
|
|
| |
Related docstring changes.
Unrelated comment changes.
|
|
|
|
| |
in 'find_command_class()' method.
|
|
|
|
| |
Typo fix.
|
|
|
|
|
|
|
|
| |
* "--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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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()'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
|
|
| |
Error message tweak in Command.set_option().
Added Command.get_peer_option().
Added Command.move_file() wrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()'.
|
| |
|
| |
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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).
|
|
|