|
Boost-Build : |
From: Josh Napoli (jnapoli_at_[hidden])
Date: 2007-11-17 12:59:04
I'd like to build and test a python extension using bjam. How can I run
a test against a python-extension without deleting the .pyd dependency?
Based on the documentation, examples and tools/python.jam it appears
that a python extension with a unit test should be built with a Jamfile
like this:
import python ;
python-extension PyExt
: # sources
[ glob *.cpp *.hpp ]
/boost/python//boost_python
;
bpl-test testA : PyExt test/test_A.py ;
bpl-test testB : PyExt test/test_B.py ;
alias buildtest : PyExt testA testB ;
explicit test_A test_B ;
However, when testA passes, the PyExt.pyd file is deleted. testB fails,
due to the missing dependency.
Why would you ever want to have the test rule delete the .pyd?
Thanks,
Joshua Napoli
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