diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2001-01-16 16:16:03 +0000 |
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2001-01-16 16:16:03 +0000 |
| commit | f2bbadb65842cbe0f328289b32e7d1bc5cbae765 (patch) | |
| tree | 635a2fa2f4b8a06258692563f498dff1f2e41383 /Lib | |
| parent | fcb3fb92badb21e784585dae3e287e7db7f0f2d5 (diff) | |
| download | cpython-f2bbadb65842cbe0f328289b32e7d1bc5cbae765.tar.gz | |
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.
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/distutils/command/install.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 806da01afa..40e00705d3 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 |
