Return a Command that combines several commands.
(*commands)
| 251 | |
| 252 | |
| 253 | def combine_commands(*commands): |
| 254 | """Return a Command that combines several commands.""" |
| 255 | |
| 256 | class CombinedCommand(Command): |
| 257 | user_options = [] |
| 258 | |
| 259 | def initialize_options(self): |
| 260 | self.commands = [] |
| 261 | for C in commands: |
| 262 | self.commands.append(C(self.distribution)) |
| 263 | for c in self.commands: |
| 264 | c.initialize_options() |
| 265 | |
| 266 | def finalize_options(self): |
| 267 | for c in self.commands: |
| 268 | c.finalize_options() |
| 269 | |
| 270 | def run(self): |
| 271 | for c in self.commands: |
| 272 | c.run() |
| 273 | return CombinedCommand |
| 274 | |
| 275 | |
| 276 | def compare_recursive_mtime(path, cutoff, newest=True): |