Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decrease CppBase rigidity #10

Merged
merged 4 commits into from
Mar 25, 2022
Merged

decrease CppBase rigidity #10

merged 4 commits into from
Mar 25, 2022

Conversation

jhalmen
Copy link

@jhalmen jhalmen commented Feb 16, 2022

This series of commits starts out with some general improvements, then improves CppBases flexibility, and finally reenables current usage of the class.

This could still be simplified further, all the while increasing flexibility, but I expect this to be a nice middle ground between still guiding unknowledgeable users, while not hindering others.

I could also update the pymoskito examples to use the undeprecated arguments of CppBase if this is desired

@jhalmen
Copy link
Author

jhalmen commented Feb 16, 2022

commit 357d523 can just be reverted when the time comes to not support the old usage anymore

also fix some whitespace errors
considering it will get built right away, this is informational at most
instead of requiring that the module be defined in one .cpp and .h file
named 'module_name' only require the binding_*.cpp, and allow additional
source files to be added to the compilation unit.
This makes life easier for people who use header-only libraries, and
enables binding multiple source files into the same pybind module.

If necessary, adding the possibility for further include folders later
should be trivial.
this reintroduces the previous usage of binding_class_name, so that
updating pymoskito doesn't break old pybinds.
a friendly warning is generated, mentioning that this is now deprecated.
@TanDro TanDro merged commit 72785dc into umit-iace:master Mar 25, 2022
TanDro pushed a commit that referenced this pull request Mar 25, 2022
* do not repeat log/error messages

also fix some whitespace errors

* lower log level of 'cmakelists not found'

considering it will get built right away, this is informational at most

* decrease CppBase rigidity

instead of requiring that the module be defined in one .cpp and .h file
named 'module_name' only require the binding_*.cpp, and allow additional
source files to be added to the compilation unit.
This makes life easier for people who use header-only libraries, and
enables binding multiple source files into the same pybind module.

If necessary, adding the possibility for further include folders later
should be trivial.

* cppbase: deprecate usage of binding_class_name

this reintroduces the previous usage of binding_class_name, so that
updating pymoskito doesn't break old pybinds.
a friendly warning is generated, mentioning that this is now deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants