Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install waf?

Tags:

waf

I have cloned and built the waf script using:

./waf-light configure

Then to build my project (provided by Gomspace) I need to add waf and the eclipse.py to my path. So far I haven't found better than this setenv script:

WAFROOT=~/git/waf/
export PYTHONPATH=$WAFROOT/waflib/extras/:$PYTHONPATH
export PATH=~/git/waf/:$PATH

Called with:

source setenv

This is somehow a pretty ugly solution. Is there a more elegant way to install waf?

like image 959
nowox Avatar asked Mar 09 '23 06:03

nowox


1 Answers

You don't install waf. The command you found correctly builds waf: /waf-light configure build Then for each project you create, you put the built waf script into that projects root directory. I can't find a reference, but this is the way in which waf:s primary author Thomas Nagy wants the tool to be used. Projects that repackage waf to make the tool installable aren't "officially sanctioned."

There are advantages and disadvantages with non-installation:

Disadvantages:

  • You have to add the semi-binary 100kb large waf file to your repository.
  • Because the file contains binary code, people can have legal objections to distributing it.

Advantages:

  • It doesn't matter if new versions of waf break the old API.
  • Users don't need to install waf before compiling the project -- having Python on the system is enough.
like image 105
Björn Lindqvist Avatar answered Jun 01 '23 09:06

Björn Lindqvist