summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2001-01-16 16:16:03 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2001-01-16 16:16:03 (GMT)
commit9710297e365185e7cdb1a1075a6a1b3d378bd4fc (patch)
tree1684319830b3a47e5ff4017f0281ef7650d48abf
parentc00df0bbba3c0c409aada5aba82cfede08778d81 (diff)
downloadcpython-9710297e365185e7cdb1a1075a6a1b3d378bd4fc.zip
cpython-9710297e365185e7cdb1a1075a6a1b3d378bd4fc.tar.gz
cpython-9710297e365185e7cdb1a1075a6a1b3d378bd4fc.tar.bz2
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.
-rw-r--r--Lib/distutils/command/install.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 806da01..40e0070 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -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