From d17bb06e36077fbde6a796652e4e02bf30ba0993 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 14 Feb 2015 12:07:13 +0100 Subject: [PATCH] waf 1.8.6 --- ChangeLog | 18 ++++++++++++++++++ utils/genbench.py | 5 +++-- waf-light | 3 ++- waflib/Context.py | 8 ++++---- wscript | 18 +++++++++++++----- 5 files changed, 40 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index e66213d1..8b4ee473 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +NEW IN WAF 1.8.6 +---------------- +* Python file installation fixes +* Fix for classes containing utf-8 names +* Hide the progress bar when running waf -ppp +* Support more header extensions in subst/is_copy +* Handle non-string and non-list values in substitutions (subst) +* Show how to track build files timestamps to force partial rebuilds (build_file_tracker.py) +* Added a new extension to detect blender libraries +* Added extras/prefork.py, extras/preforkunix.py and extras/preforkjava.py +* Updated demos/d +* Updated demos/vala +* Updated playground/protobuf +* Updated playground/cython +* Updated playground/dynamic_headers +* Updated playground/netcache +* Qt5 detection improvements + NEW IN WAF 1.8.5 ---------------- * Enhanced Sun compiler detection #1510 diff --git a/utils/genbench.py b/utils/genbench.py index c0e5165b..9af91e94 100755 --- a/utils/genbench.py +++ b/utils/genbench.py @@ -6,8 +6,6 @@ import os.path from random import Random random = Random(0) # initialise with seed to have reproductible benches -# for example: ./genbench.py /tmp/build 50 100 15 5 - HELP_USAGE = """Usage: generate_libs.py root libs classes internal external. root - Root directory where to create libs. libs - Number of libraries (libraries only depend on those with smaller numbers) @@ -15,6 +13,9 @@ HELP_USAGE = """Usage: generate_libs.py root libs classes internal external. internal - Number of includes per file referring to that same library external - Number of includes per file pointing to other libraries +For example: +./genbench.py /tmp/build 200 100 15 5 + To try the waf part, do: waf configure build -p -j5 diff --git a/waf-light b/waf-light index 0e0e36bf..9c813d2b 100755 --- a/waf-light +++ b/waf-light @@ -32,8 +32,9 @@ POSSIBILITY OF SUCH DAMAGE. import os, sys, inspect -VERSION="1.8.5" +VERSION="1.8.6" REVISION="x" +GIT="x" INSTALL="x" C1='x' C2='x' diff --git a/waflib/Context.py b/waflib/Context.py index 5e05ce81..90aab78e 100644 --- a/waflib/Context.py +++ b/waflib/Context.py @@ -11,14 +11,14 @@ from waflib import Utils, Errors, Logs import waflib.Node # the following 3 constants are updated on each new release (do not touch) -HEXVERSION=0x1080500 +HEXVERSION=0x1080600 """Constant updated on new releases""" -WAFVERSION="1.8.5" +WAFVERSION="1.8.6" """Constant updated on new releases""" -WAFREVISION="b694c0da84f1a3f6b27b9d4a07c9f5cb2116d831" -"""Constant updated on new releases""" +WAFREVISION="cc875ba2c2a7bd78d7a84b038f542339d6f34ce3" +"""Git revision when the waf version is updated""" ABI = 98 """Version of the build data cache file format (used in :py:const:`waflib.Context.DBFILE`)""" diff --git a/wscript b/wscript index 458e8a4f..57a018bf 100644 --- a/wscript +++ b/wscript @@ -10,7 +10,7 @@ To add a tool that does not exist in the folder compat15, pass an absolute path: """ -VERSION="1.8.5" +VERSION="1.8.6" APPNAME='waf' REVISION='' @@ -249,7 +249,7 @@ def sfilter(path): return (io.BytesIO(cnt.encode('utf-8')), len(cnt.encode('utf-8')), cnt) return (io.BytesIO(cnt), len(cnt), cnt) -def create_waf(*k, **kw): +def create_waf(self, *k, **kw): mw = 'tmp-waf-'+VERSION print("-> preparing %r" % mw) @@ -320,12 +320,20 @@ def create_waf(*k, **kw): f.close() # now store the revision unique number in waf - #compute_revision() - #reg = re.compile('^REVISION=(.*)', re.M) - #code1 = reg.sub(r'REVISION="%s"' % REVISION, code1) code1 = code1.replace("if sys.hexversion<0x206000f:\n\traise ImportError('Python >= 2.6 is required to create the waf file')\n", '') code1 = code1.replace('\t#import waflib.extras.compat15#PRELUDE', Options.options.prelude) + # when possible, set the git revision in the waf file + bld = self.generator.bld + try: + rev = bld.cmd_and_log("git rev-parse HEAD").strip() + except Exception: + pass + else: + reg = re.compile('^GIT(.*)', re.M) + code1 = reg.sub('GIT="%s"' % rev, code1) + + # if the waf file is installed somewhere... but do not do that prefix = '' reg = re.compile('^INSTALL=(.*)', re.M) code1 = reg.sub(r'INSTALL=%r' % prefix, code1)