diff options
author | Greg Ward <gward@python.net> | 2000-03-31 02:52:02 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-03-31 02:52:02 (GMT) |
commit | ba38d12063919288d6593593493cd37057d0ba67 (patch) | |
tree | a3e99a94191e7bc6bd21da335d46889e9d27cf1f /Lib | |
parent | 578c10d9a542883428b54ef4684497c31b4cf8d3 (diff) | |
download | cpython-ba38d12063919288d6593593493cd37057d0ba67.zip cpython-ba38d12063919288d6593593493cd37057d0ba67.tar.gz cpython-ba38d12063919288d6593593493cd37057d0ba67.tar.bz2 |
Fixed 'get_outputs()' so it actually works.
Added 'get_inputs()' (which is strikingly similar to 'get_outputs()' - sigh).
Cosmetic tweaks.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/install.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index ac9ec86..995fd87 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -365,9 +365,9 @@ class install (Command): # Run all sub-commands: currently this just means install all # Python modules using 'install_lib'. - for (func, cmd) in self.sub_commands: + for (func, cmd_name) in self.sub_commands: if func is None or func(): - self.run_peer (cmd) + self.run_peer (cmd_name) if self.path_file: self.create_path_file () @@ -387,13 +387,25 @@ class install (Command): # This command doesn't have any outputs of its own, so just # get the outputs of all its sub-commands. outputs = [] - for (func, cmd) in self.sub_commands: + for (func, cmd_name) in self.sub_commands: if func is None or func(): - outputs.extend (self.run_peer (cmd)) + cmd = self.find_peer (cmd_name) + outputs.extend (cmd.get_outputs()) return outputs + def get_inputs (self): + # XXX gee, this looks familiar ;-( + inputs = [] + for (func, cmd_name) in self.sub_commands: + if func is None or func(): + cmd = self.find_peer (cmd_name) + inputs.extend (cmd.get_inputs()) + + return inputs + + def create_path_file (self): filename = os.path.join (self.install_libbase, self.path_file + ".pth") |