From f87ff1060daf06c6a28c0c5ce8a85eac7fb1b8ea Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Tue, 24 Feb 2015 21:20:15 +0100 Subject: [PATCH] xz compression is new in Python 3.5 --- waflib/Scripting.py | 2 +- wscript | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/waflib/Scripting.py b/waflib/Scripting.py index 7cb5910f..4a78557c 100644 --- a/waflib/Scripting.py +++ b/waflib/Scripting.py @@ -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 diff --git a/wscript b/wscript index 57a018bf..bb18e641 100644 --- a/wscript +++ b/wscript @@ -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: