It wasn't too bad. A couple weekends of screw-around time. It's similar in spirit (and syntax) to Boost.Python, but cleaner. I'm very bullish on pybind11 now, I would definitely recommend it for a new project that needs python bindings. It was perhaps a little less of a clear win for OIIO that had working Boost.Python API already, but I felt that it was a good investment for the future.
> On Nov 9, 2017, at 6:57 PM, Jonathan Gibbs <[email protected]> wrote: > > Oooh, pybind11 hasn't crossed my path before -- very interesting. How much > work was it to move? > --jono > > > On Thu, Nov 9, 2017 at 5:48 PM Larry Gritz <[email protected] > <mailto:[email protected]>> wrote: > Those of you who have the OIIO Python bindings on your critical paths, please > be aware of this outstanding PR: > > https://github.com/OpenImageIO/oiio/pull/1801 > <https://github.com/OpenImageIO/oiio/pull/1801> > > in which I refactor the python bindings to use pybind11 instead of > Boost.Python, and in the process make some changes to our Python APIs. They > are not big changes, but they are breaking changes! The most significant is > that the methods that pass big blocks of pixels around (like > ImageInput.read_image()) will now deal in Numpy ndarray's, rather than old > school python array.array. I think this is an improvement, but like I said, > it's a breaking change. > > This will only go in master, it won't retroactively break any release > branches, including the current stable 1.8 (which will be the supported > release family for several more months, I'm expecting). > > But to keep from having a surprise in June when you switch to 1.9 after a > release, and then it's WAY too late to change anything, I strongly encourage > stakeholders in the Python APIs to check out the proposed PR, try it with > your scripts and figure out how big a PITA the conversion is going to be. We > can certainly make course corrections if the consensus is that I've made > things too painful. > > > -- > Larry Gritz > [email protected] <mailto:[email protected]> > > > > > _______________________________________________ > Oiio-dev mailing list > [email protected] <mailto:[email protected]> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
