Renamed 'install_path' to 'extra_path'.

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.
This commit is contained in:
Greg Ward 2000-03-22 00:20:46 +00:00
parent a233d86638
commit 7f6ef6ca26
1 changed files with 6 additions and 2 deletions

View File

@ -197,7 +197,7 @@ class Distribution:
self.ext_modules = None
self.ext_package = None
self.include_dirs = None
self.install_path = None
self.extra_path = None
# And now initialize bookkeeping stuff that can't be supplied by
# the caller at all. 'command_obj' maps command names to
@ -840,7 +840,7 @@ class Command:
# Option_pairs: list of (src_option, dst_option) tuples
src_cmd_obj = self.distribution.find_command_obj (src_cmd)
src_cmd_obj.finalize_options ()
src_cmd_obj.ensure_ready ()
try:
for (src_option, dst_option) in option_pairs:
if getattr (self, dst_option) is None:
@ -862,6 +862,10 @@ class Command:
second 'finalize_options()' invocation will have little or no
effect."""
# XXX this won't work -- must call finalize_option to work, but
# calling finalize_option is wrong (it's only supposed to be called
# once). Where is this needed?!??!
cmd_obj = self.distribution.find_command_obj (command)
cmd_obj.set_option (option, value)
cmd_obj.finalize_options ()