mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Changed to use the method versions of 'copy_file()', 'copy_tree()',
and 'make_file()'-- that way, the verbose and dry-run flags are handled for free.
This commit is contained in:
parent
bd3bdde70b
commit
4070f50537
3 changed files with 7 additions and 12 deletions
|
@ -84,11 +84,10 @@ class BuildPy (Command):
|
|||
for i in range (len (infiles)):
|
||||
outdir = os.path.split (outfiles[i])[0]
|
||||
if not created.get(outdir):
|
||||
mkpath (outdir, verbose=self.distribution.verbose)
|
||||
self.mkpath (outdir)
|
||||
created[outdir] = 1
|
||||
|
||||
copy_file (infiles[i], outfiles[i],
|
||||
update=1, verbose=self.distribution.verbose)
|
||||
self.copy_file (infiles[i], outfiles[i])
|
||||
|
||||
# (Optionally) compile .py to .pyc
|
||||
# XXX hey! we can't control whether we optimize or not; that's up
|
||||
|
@ -102,9 +101,9 @@ class BuildPy (Command):
|
|||
# XXX can't assume this filename mapping!
|
||||
out_fn = string.replace (f, '.py', '.pyc')
|
||||
|
||||
make_file (f, out_fn, compile, (f,),
|
||||
verbose=self.distribution.verbose,
|
||||
update_message="compiling %s" % f)
|
||||
self.make_file (f, out_fn, compile, (f,),
|
||||
"compiling %s -> %s" % (f, out_fn),
|
||||
"compilation of %s skipped" % f)
|
||||
|
||||
# XXX ignore self.optimize for now, since we don't really know if
|
||||
# we're compiling optimally or not, and couldn't pick what to do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue