Skip to content

Fix for pybind version >= 2.8.1#216

Merged
hugtalbot merged 1 commit intosofa-framework:masterfrom
fredroy:fix_pybind_2_8_1
Dec 1, 2021
Merged

Fix for pybind version >= 2.8.1#216
hugtalbot merged 1 commit intosofa-framework:masterfrom
fredroy:fix_pybind_2_8_1

Conversation

@fredroy
Copy link
Contributor

@fredroy fredroy commented Nov 18, 2021

Since the version 2.8.1, pybind is doing the binding on attributeError automatically.
(pybind/pybind11@78ee782)
It will be throw a compilation error in SofaPython3 because it was also bind here and there (already defined error)

This PR creates a macro (to avoid copy-paste) which, according to the version of pybind, bind or not the attribute_error.

I am also wondering if it was really necessary to do it in each binding_module (and PythonFactory.cpp) and why not once for all in the PythonFactory.h ?

@hugtalbot hugtalbot merged commit ef987c1 into sofa-framework:master Dec 1, 2021
@fredroy fredroy deleted the fix_pybind_2_8_1 branch December 1, 2021 09:12
@guparan guparan added this to the v21.12 milestone Dec 15, 2021
guparan pushed a commit that referenced this pull request Mar 7, 2022
guparan pushed a commit that referenced this pull request Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants