[Smtk-developers] Python wrapping

TJ Corona tj.corona at kitware.com
Fri Sep 15 08:50:48 EDT 2017


Hi David,

This MR <https://gitlab.kitware.com/cmb/smtk/merge_requests/852/diffs> adds an example for passing multiple include paths to the python script. I’d be happy to make the interface less clunky if you think that would help (you are not the first person who found this syntax unintuitive).

Sincerely,
T.J.

Thomas J. Corona, Ph.D.
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4443

> On Sep 14, 2017, at 5:50 PM, David Thompson <david.thompson at kitware.com> wrote:
> 
> Hi TJ (at al.),
> 
> I'm having problems running the script to generate Pybind11 bindings after making some changes to smtk::model. The generate_pybind11_module.py script dies because it cannot find moab includes. Adding additional "-I" arguments to specify where the extra headers exist does not seem to work, nor does passing in CXXFLAGS environment variables like so:
> 
>  cd /path/to/SMTK/source
>  export CXXFLAGS=" -I/Stage/Build/cmb/common-superbuild/install/include"
>  python2.7  utilities/python/generate_pybind11_module.py  \
>     -I /path/to/build/dir  -i smtk/model -o /tmp/pybind11 -m smtk.model -s `pwd`
> 
> Do you have an example of how to run the script? The docs[1] don't go over the options or how to handle missing includes.
> 
> 	Thanks,
> 	David
> 
> [1]: http://smtk.readthedocs.io/en/latest/userguide/bindings/generating-pybind11-bindings.html
> 
> The error message is:
> 
> INFO Parsing source file "/path/to/smtk/model/AttributeListPhrase.h" ... 
> In file included from /path/to/smtk/model/AttributeListPhrase.h:14:
> In file included from ./smtk/model/DescriptivePhrase.h:14:
> In file included from ./smtk/mesh/MeshSet.h:17:
> In file included from ./smtk/mesh/CellSet.h:18:
> In file included from ./smtk/mesh/Handle.h:17:
> ./smtk/mesh/moab/HandleRange.h:20:10: fatal error: 'moab/EntityHandle.hpp' file not found
> #include "moab/EntityHandle.hpp"
>         ^
> 1 error generated.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20170915/a501f5aa/attachment-0001.html>


More information about the Smtk-developers mailing list