Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-06 01:32:11


On Friday 03 June 2005 23:07, David Abrahams wrote:
> Craig Rodrigues <rodrigc_at_[hidden]> writes:
> > What is the correct Jam syntax to do this?
>
> There is none so far. Someone needs to implement os.popen from Python
> or the equivalent for bjam.

This is absolutely no needed. The users must built bjam with Python support
enabled and directly use os.popen ;-)

If the attached two files are placed into 'examples/hello', you can add this
to Jamroot:

import capture ;
ECHO [ capture.output "ls" ] ;

You'd need up-to-date bjam for this to work -- I've just fixed a minor bug
affecting Python integration. To enable Python support, look at HAVE_PYTHON
in jam_src/build.jam. Tested on Linix.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 --Boundary-00=_r3+oCQ66kUsgSmX Content-Type: text/plain;
charset="iso-8859-1";
name="capture.jam"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="capture.jam"
PYTHON_IMPORT_RULE capture : output : capture : output ;
EXPORT capture : output ;
 --Boundary-00=_r3+oCQ66kUsgSmX Content-Type: application/x-python;
name="capture.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="capture.py"
[Attachment content not displayed.] --Boundary-00=_r3+oCQ66kUsgSmX-- 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk