Waf projects use wscript files that describe how the builds should be performed. Those wscript files are actually python files, but they cannot be executed directly. The goal here is to support the direct execution of wscript files to avoid to change the current directory to the project. Instead of
cd /tmp/foo && ./wafthe build should run using
Create a testcase in a new folder in the Waf project, for example in playground/wscript_execution, and add a test wscript file containing
#! /usr/bin/env wafin its header. Locate where the entry point in the Waf script is located, and modify it so that the very first parameter on the command-line (sys.argv) is processed in a particular manner if it ends in 'wscript' and contains separators such as "/". This testcase must be tested on Windows (msys, cygwin) and Linux, and on Python 2 and 3. It will assume that the Waf file is present in the system path.
When done, create a patch by using git-format and submit an enhancement request to the Waf bug tracker on googlecode and post the resulting URL to this task.
When you've done, post the resulting tool this task.