mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Build the 'outfiles' list so 'get_outputs()' has something to return.
(Bug spotted and originally fixed by Rene Liebscher; fix redone by me.)
This commit is contained in:
parent
e2383a6c77
commit
afc224beec
2 changed files with 15 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue