2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-21 17:35:55 +01:00

xz compression is new in Python 3.5

This commit is contained in:
Thomas Nagy 2015-02-24 21:20:15 +01:00
parent b9e3d25918
commit f87ff1060d
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 4 additions and 2 deletions

View File

@ -377,7 +377,7 @@ class Dist(Context.Context):
zip.write(x.abspath(), archive_name, zipfile.ZIP_DEFLATED)
zip.close()
else:
self.fatal('Valid algo types are tar.bz2, tar.gz or zip')
self.fatal('Valid algo types are tar.bz2, tar.gz, tar.xz or zip')
try:
from hashlib import sha1 as sha

View File

@ -18,7 +18,7 @@ top = '.'
out = 'build'
demos = ['cpp', 'qt4', 'tex', 'ocaml', 'kde3', 'adv', 'cc', 'idl', 'docbook', 'xmlwaf', 'gnome']
zip_types = ['bz2', 'gz']
zip_types = ['bz2', 'gz', 'xz']
PRELUDE = ''
@ -342,6 +342,8 @@ def create_waf(self, *k, **kw):
code1 = reg.sub(zipType, code1)
if zipType == 'gz':
code1 = code1.replace('bunzip2', 'gzip -d')
elif zipType == 'xz':
code1 = code1.replace('bunzip2', 'xz -d')
f = open('%s.tar.%s' % (mw, zipType), 'rb')
try: