Boost logo

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 ]
  bpl-test testA : PyExt test/ ;
  bpl-test testB : PyExt test/ ;
  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?

Joshua Napoli

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at