mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Modified version of a patch from Jeremy Kloth, to make .get_outputs()
produce a list of unique filenames: "While attempting to build an RPM using distutils on Python 2.0, rpm complained about duplicate files. The following patch fixed that problem.
This commit is contained in:
parent
c00df0bbba
commit
9710297e36
1 changed files with 5 additions and 1 deletions
|
@ -530,7 +530,11 @@ class install (Command):
|
|||
outputs = []
|
||||
for cmd_name in self.get_sub_commands():
|
||||
cmd = self.get_finalized_command(cmd_name)
|
||||
outputs.extend(cmd.get_outputs())
|
||||
# Add the contents of cmd.get_outputs(), ensuring
|
||||
# that outputs doesn't contain duplicate entries
|
||||
for filename in cmd.get_outputs():
|
||||
if filename not in outputs:
|
||||
outputs.append(filename)
|
||||
|
||||
return outputs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue