Update of /cvsroot/python/distutils/distutils/command In directory slayer.i.sourceforge.net:/tmp/cvs-serv23031 Modified Files: bdist.py Log Message: Rene Liebscher: if we have to run the same sub-command multiple times (eg. "bdist_dumb", to generate both ZIP and tar archives in the same run), tell all but the last run to keep temp files -- this just gets rid of the need to pseudo-install the same files multiple times. Index: bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** bdist.py 2000/09/11 00:47:35 1.17 --- bdist.py 2000/09/16 16:04:59 1.18 *************** *** 91,95 **** if self.bdist_base is None: build_base = self.get_finalized_command('build').build_base ! self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name) self.ensure_string_list('formats') --- 91,96 ---- if self.bdist_base is None: build_base = self.get_finalized_command('build').build_base ! self.bdist_base = os.path.join(build_base, ! 'bdist.' + self.plat_name) self.ensure_string_list('formats') *************** *** 110,123 **** def run (self): for format in self.formats: try: ! cmd_name = self.format_command[format][0] except KeyError: ! raise DistutilsOptionError, \ ! "invalid format '%s'" % format sub_cmd = self.reinitialize_command(cmd_name) if cmd_name not in self.no_format_option: ! sub_cmd.format = format self.run_command (cmd_name) --- 111,136 ---- def run (self): + # Figure out which sub-commands we need to run. + commands = [] for format in self.formats: try: ! commands.append(self.format_command[format][0]) except KeyError: ! raise DistutilsOptionError, "invalid format '%s'" % format + # Reinitialize and run each command. + for i in range(len(self.formats)): + cmd_name = commands[i] sub_cmd = self.reinitialize_command(cmd_name) if cmd_name not in self.no_format_option: ! sub_cmd.format = self.formats[i] ! ! print ("bdist.run: format=%s, command=%s, rest=%s" % ! (self.formats[i], cmd_name, commands[i+1:])) ! ! # If we're going to need to run this command again, tell it to ! # keep its temporary files around so subsequent runs go faster. ! if cmd_name in commands[i+1:]: ! sub_cmd.keep_temp = 1 self.run_command (cmd_name)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4