|
Boost : |
Subject: Re: [boost] [python] run python script from bjam
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-06-03 06:08:02
on Fri May 25 2012, lcaminiti <lorcaminiti-AT-gmail.com> wrote:
> Hello all,
>
> I build a Boost.Python module and install it using bjam as follow:
>
> python-extension pydef : deduced_params_pydef.cpp
> : <library>/boost/python//boost_python
> <library>/boost/regex//boost_regex
> <link>shared:<define>BOOST_REGEX_DYN_LINK=1
> ;
> install pydef_install : pydef
> : <install-dependencies>on
> <install-type>SHARED_LIB
> <install-type>PYTHON_EXTENSION
> <location>.
> ;
>
> I the same dir I have a python script deduced_params_pydef.py which will
> import the module and test it.
>
> How do I run the python script automatically from bjam so to fully compile
> and test the module that my code generates?
>
> Something like (this doesn't work of course):
>
> # Make sure pydef target is built first, then runs python
> deduced_params_pydef.py
> run-py pydef_install : deduced_params_pydef.py ;
Take a look at Boost.Python's own tests; that should give you everything
you need.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk