diff options
author | Greg Ward <gward@python.net> | 2000-06-21 03:13:51 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-21 03:13:51 (GMT) |
commit | afc224beeca432d8261be5d647a931fe3b8d0193 (patch) | |
tree | cea9dbaf6ee7d9d49eb1bf1064d2977da234a766 /Lib/distutils/command/install_data.py | |
parent | e2383a6c774e41357824db4ea1db0b06182fe672 (diff) | |
download | cpython-afc224beeca432d8261be5d647a931fe3b8d0193.zip cpython-afc224beeca432d8261be5d647a931fe3b8d0193.tar.gz cpython-afc224beeca432d8261be5d647a931fe3b8d0193.tar.bz2 |
Build the 'outfiles' list so 'get_outputs()' has something to return.
(Bug spotted and originally fixed by Rene Liebscher; fix redone by me.)
Diffstat (limited to 'Lib/distutils/command/install_data.py')
-rw-r--r-- | Lib/distutils/command/install_data.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/distutils/command/install_data.py b/Lib/distutils/command/install_data.py index 5481dab..f8ed0a7 100644 --- a/Lib/distutils/command/install_data.py +++ b/Lib/distutils/command/install_data.py @@ -25,7 +25,7 @@ class install_data (Command): def initialize_options (self): self.install_dir = None - self.outfiles = None + self.outfiles = [] self.root = None self.data_files = self.distribution.data_files @@ -40,7 +40,8 @@ class install_data (Command): for f in self.data_files: if type(f) == StringType: # its a simple file, so copy it - self.copy_file(f, self.install_dir) + out = self.copy_file(f, self.install_dir) + self.outfiles.append(out) else: # its a tuple with path to install to and a list of files dir = f[0] @@ -50,10 +51,11 @@ class install_data (Command): dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: - self.copy_file(data, dir) + out = self.copy_file(data, dir) + self.outfiles.append(out) def get_inputs (self): return self.data_files or [] def get_outputs (self): - return self.outfiles or [] + return self.outfiles |