This commit is contained in:
Kovid Goyal 2014-07-12 16:10:41 +05:30
parent 65d6c5979c
commit fd06b97d9d

View File

@ -52,7 +52,7 @@ path=(~/bin "$path[@]")
''' '''
import sys, os, shutil, platform, subprocess, stat, py_compile, glob, textwrap, tarfile import sys, os, shutil, platform, subprocess, stat, py_compile, glob, textwrap, tarfile, time
from functools import partial from functools import partial
from setup import Command, modules, basenames, functions, __version__, __appname__ from setup import Command, modules, basenames, functions, __version__, __appname__
@ -281,7 +281,9 @@ class LinuxFreeze(Command):
if False: if False:
os.rename(dist, ans) os.rename(dist, ans)
else: else:
start_time = time.time()
subprocess.check_call(['xz', '-f', '-9', dist]) subprocess.check_call(['xz', '-f', '-9', dist])
self.info('Compressed in %d seconds' % round(time.time() - start_time))
os.rename(dist + '.xz', ans) os.rename(dist + '.xz', ans)
self.info('Archive %s created: %.2f MB'%( self.info('Archive %s created: %.2f MB'%(
os.path.basename(ans), os.stat(ans).st_size/(1024.**2))) os.path.basename(ans), os.stat(ans).st_size/(1024.**2)))