Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15211)

Side by Side Diff: Lib/distutils/cmd.py

Issue 6516: reset owner/group to root for distutils tarballs
Patch Set: Created 5 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/distutils/archive_util.py ('k') | Lib/distutils/command/bdist_dumb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """distutils.cmd 1 """distutils.cmd
2 2
3 Provides the Command class, the base class for the command classes 3 Provides the Command class, the base class for the command classes
4 in the distutils.command package. 4 in the distutils.command package.
5 """ 5 """
6 6
7 import sys, os, re 7 import sys, os, re
8 from distutils.errors import DistutilsOptionError 8 from distutils.errors import DistutilsOptionError
9 from distutils import util, dir_util, file_util, archive_util, dep_util 9 from distutils import util, dir_util, file_util, archive_util, dep_util
10 from distutils import log 10 from distutils import log
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 def move_file (self, src, dst, level=1): 359 def move_file (self, src, dst, level=1):
360 """Move a file respecting dry-run flag.""" 360 """Move a file respecting dry-run flag."""
361 return file_util.move_file(src, dst, dry_run=self.dry_run) 361 return file_util.move_file(src, dst, dry_run=self.dry_run)
362 362
363 def spawn(self, cmd, search_path=1, level=1): 363 def spawn(self, cmd, search_path=1, level=1):
364 """Spawn an external command respecting dry-run flag.""" 364 """Spawn an external command respecting dry-run flag."""
365 from distutils.spawn import spawn 365 from distutils.spawn import spawn
366 spawn(cmd, search_path, dry_run=self.dry_run) 366 spawn(cmd, search_path, dry_run=self.dry_run)
367 367
368 def make_archive(self, base_name, format, root_dir=None, base_dir=None): 368 def make_archive(self, base_name, format, root_dir=None, base_dir=None,
369 owner=None, group=None):
369 return archive_util.make_archive(base_name, format, root_dir, base_dir, 370 return archive_util.make_archive(base_name, format, root_dir, base_dir,
370 dry_run=self.dry_run) 371 dry_run=self.dry_run,
372 owner=owner, group=group)
371 373
372 def make_file(self, infiles, outfile, func, args, 374 def make_file(self, infiles, outfile, func, args,
373 exec_msg=None, skip_msg=None, level=1): 375 exec_msg=None, skip_msg=None, level=1):
374 """Special case of 'execute()' for operations that process one or 376 """Special case of 'execute()' for operations that process one or
375 more input files and generate one output file. Works just like 377 more input files and generate one output file. Works just like
376 'execute()', except the operation is skipped and a different 378 'execute()', except the operation is skipped and a different
377 message printed if 'outfile' already exists and is newer than all 379 message printed if 'outfile' already exists and is newer than all
378 files listed in 'infiles'. If the command defined 'self.force', 380 files listed in 'infiles'. If the command defined 'self.force',
379 and it is true, then the command is unconditionally run -- does no 381 and it is true, then the command is unconditionally run -- does no
380 timestamp checks. 382 timestamp checks.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 self.outfiles = [] 426 self.outfiles = []
425 if not filelist: 427 if not filelist:
426 return 428 return
427 self.mkpath(self.install_dir) 429 self.mkpath(self.install_dir)
428 for f in filelist: 430 for f in filelist:
429 self.copy_file(f, self.install_dir) 431 self.copy_file(f, self.install_dir)
430 self.outfiles.append(os.path.join(self.install_dir, f)) 432 self.outfiles.append(os.path.join(self.install_dir, f))
431 433
432 def get_outputs(self): 434 def get_outputs(self):
433 return self.outfiles 435 return self.outfiles
OLDNEW
« no previous file with comments | « Lib/distutils/archive_util.py ('k') | Lib/distutils/command/bdist_dumb.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+