Trevor,

that is certainly possible, all my python exports look like this:

#include "pfemPy.inl"

BOOST_PYTHON_MODULE(pfemPy)
{
  PfemInst::call();
} // boost module

Then e.g. in "pfemPy.inl" I wrap and export the C++ classes. The file
"pfemPy.inl" in turn includes the header of the required source which
are "untoched".

I can not help you about the Jamroot, as I am not using bjam.

-Holger

On Wed, Jun 12, 2013 at 11:05 AM, Trevor Haba <trevor.h...@logmein.com> wrote:
> Hello,
>
>
>
> I am attempting to make a large pre-existing code base accessible to python,
> so that I can run quick scripts to automate the behavior of certain classes
> for testing purposes. We are using C++ and python 3.3 with the boost.python
> library. I have a script to automatically generate the BOOST_PYTHON_MODULE(
> … ) wrapper definitions for the C++ source code. But, because this is a
> pre-existing code base with other people already working on it, I would
> prefer to not have to modify the source code files of all of the classes by
> inserting the python wrappers at the bottom. All the examples I’ve seen show
> the BOOST_PYTHON_MODULE at the bottom of the C++ source file. Is it possible
> to put the BOOST_PYTHON_MODULE in a separate file, and #include the class it
> is wrapping? If so, how would I do this? And how would I configure the
> Jamroot file to compile these properly?
>
>
>
> Also, I’m targeting windows systems and using Visual Studio 2010, if that
> matters
>
>
>
> Thanks very much,
>
> Trevor
>
>
>
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to