Browse Source

Update to waf 2.0.12

tags/v1.9.13
Karl Linden 2 years ago
parent
commit
c0b9412365
No known key found for this signature in database GPG Key ID: C0F669D8CE2576AB
5 changed files with 17 additions and 7 deletions
  1. +1
    -1
      waf
  2. +4
    -0
      waflib/Build.py
  3. +3
    -3
      waflib/Context.py
  4. +8
    -2
      waflib/Task.py
  5. +1
    -1
      waflib/Tools/waf_unit_test.py

+ 1
- 1
waf View File

@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.

import os, sys, inspect

VERSION="2.0.11"
VERSION="2.0.12"
REVISION="x"
GIT="x"
INSTALL="x"


+ 4
- 0
waflib/Build.py View File

@@ -1054,6 +1054,8 @@ class inst(Task.Task):
def get_install_path(self, destdir=True):
"""
Returns the destination path where files will be installed, pre-pending `destdir`.
Relative paths will be interpreted relative to `PREFIX` if no `destdir` is given.

:rtype: string
"""
@@ -1061,6 +1063,8 @@ class inst(Task.Task):
dest = self.install_to.abspath()
else:
dest = Utils.subst_vars(self.install_to, self.env)
if not os.path.isabs(dest):
dest = os.path.join(self.env.PREFIX, dest)
if destdir and Options.options.destdir:
dest = os.path.join(Options.options.destdir, os.path.splitdrive(dest)[1].lstrip(os.sep))
return dest


+ 3
- 3
waflib/Context.py View File

@@ -11,13 +11,13 @@ from waflib import Utils, Errors, Logs
import waflib.Node

# the following 3 constants are updated on each new release (do not touch)
HEXVERSION=0x2000b00
HEXVERSION=0x2000c00
"""Constant updated on new releases"""

WAFVERSION="2.0.11"
WAFVERSION="2.0.12"
"""Constant updated on new releases"""

WAFREVISION="a97f6fb0941091b4966b625f15ec32fa783a8bec"
WAFREVISION="54841218840ffa34fddf834680a5a17db69caa12"
"""Git revision when the waf version is updated"""

ABI = 20


+ 8
- 2
waflib/Task.py View File

@@ -50,6 +50,9 @@ def f(tsk):
bld = gen.bld
cwdx = tsk.get_cwd()
p = env.get_flat
def to_list(xx):
if isinstance(xx, str): return [xx]
return xx
tsk.last_cmd = cmd = \'\'\' %s \'\'\' % s
return tsk.exec_command(cmd, cwd=cwdx, env=env.env or None)
'''
@@ -77,7 +80,8 @@ def f(tsk):

COMPILE_TEMPLATE_SIG_VARS = '''
def f(tsk):
super(tsk.__class__, tsk).sig_vars()
sig = tsk.generator.bld.hash_env_vars(tsk.env, tsk.vars)
tsk.m.update(sig)
env = tsk.env
gen = tsk.generator
bld = gen.bld
@@ -776,6 +780,8 @@ class Task(evil):
Used by :py:meth:`waflib.Task.Task.signature`; it hashes :py:attr:`waflib.Task.Task.env` variables/values
When overriding this method, and if scriptlet expressions are used, make sure to follow
the code in :py:meth:`waflib.Task.Task.compile_sig_vars` to enable dependencies on scriptlet results.

This method may be replaced on subclasses by the metaclass to force dependencies on scriptlet code.
"""
sig = self.generator.bld.hash_env_vars(self.env, self.vars)
self.m.update(sig)
@@ -1193,7 +1199,7 @@ def compile_fun_noshell(line):
# plain code such as ${tsk.inputs[0].abspath()}
call = '%s%s' % (var, code)
add_dvar(call)
app('gen.to_list(%s)' % call)
app('to_list(%s)' % call)
else:
# a plain variable such as # a plain variable like ${AR}
app('to_list(env[%r])' % var)


+ 1
- 1
waflib/Tools/waf_unit_test.py View File

@@ -205,7 +205,7 @@ class utest(Task.Task):
return self.exec_command(self.ut_exec)

def exec_command(self, cmd, **kw):
Logs.debug('runner: %r', cmd)
self.generator.bld.log_command(cmd, kw)
if getattr(Options.options, 'dump_test_scripts', False):
script_code = SCRIPT_TEMPLATE % {
'python': sys.executable,


Loading…
Cancel
Save