show progress while compressing release tarballs

This commit is contained in:
Kovid Goyal 2022-10-17 09:55:09 +05:30
parent 55b53bcac6
commit 03fe928e3f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -220,7 +220,7 @@ def create_tarfile(env, compression_level='9'):
print('Compressing archive...')
ans = f'{dist.rpartition(".")[0]}.txz'
start_time = time.time()
subprocess.check_call(['xz', '--threads=0', '-f', f'-{compression_level}', dist])
subprocess.check_call(['xz', '--verbose', '--threads=0', '-f', f'-{compression_level}', dist])
secs = time.time() - start_time
print('Compressed in {} minutes {} seconds'.format(secs // 60, secs % 60))
os.rename(f'{dist}.xz', ans)