Re: Buildj file(s)



Hi Thomas,
first of all, thanks a lot for your participation, your knowledge is
very valuable around here!

My main sore point at the moment with the buildj infrastructure is how
we distribute it and how we hook up into waf. I'll have a play with
your tips as soon as I find some time!
See comments in line.

2010/10/4 Nagy Thomas <tnagy256 yahoo fr>:
> To ease the use of buildj (however you call it), it may be interesting to provide a single file. It is not necessary to wrap 'waf' by another program, for a few command-lines are provided (rev: 9744) to ease the creation of a custom executable (you do not have to call the resulting script 'waf').
>
> For example, having the file aba.py containing:
> """
> def foo():
>    print("hi there")
> """
>
> The waf file created by the following command-line:
>
> $ ./waf-light --make-waf --tools=compat15,/comp/waf/aba.py --prelude=$'\tfrom waflib.extras import aba\n\taba.foo()'
>
>  will include waflib/extras/aba.py (absolute paths are added to the folder 'extras'). It will be imported before any other waf module, and the function "foo" will be executed first. You may want to replace (monkey patching) waflib.Context.load_tool to enable waf to read code from yaml files, or waflib.Scripting.waf_entry_point to change the initialization system.

I've been trying to figure out how to override these functions for a
while, thanks a lot for the hints!

> Regarding the yaml files, I never heard of pyyaml before, and I do not think its use is widespread. Using different python versions can be a problem too. In my view writing a custom parser to remove the dependency sounds reasonable (python provides shlex and a python parser, building upon them should not be too difficult).

The pythom-yaml dependency is only temporary and will be replaced with
Abderrahim's parser once it's ready.

Abderrahim, one note, make sure you use common python modules from the
standard lib, I wouldn't like to depend on python 2.6 or external
modules if we can avoid it.

> I would be interested to see a specification of those yaml files too (not just an example or two). Forward compatibility is a very difficult problem with description files, and it is one of the main reasons why waf files are still plain python scripts.

I've been working on the specs for a while in the wiki page, it's just
not linked anywhere. Will update and post something on the list soon.

Again, thanks a lot for your input Thomas!

-- 
Un saludo,
Alberto Ruiz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]