-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add test for wrapping C++ library #26
Conversation
@mcflugen This is awesome! I'll update the docs with these changes. |
@mdpiper I ended up changing the package section so that name refers to the full name of the new package. That is, if you want the new package to be called pymt_heat, you would do the following [package]
name = "pymt_heat" rather than For $ babelize generate babel.toml \
--no-input \
--package=pymt_hydrotrend \
--summary="PyMT plugin for hydrotrend" \
--langauge=c \
--library=bmi_hydrotrend \
--header=bmi_hydrotrend.h \
--class=register_bmi_hydrotrend \
--name=Hydrotrend \
--requirement=hydrotrend Only a single library can be specified with |
@mcflugen Thanks for doing this. I'll update the README and the docs to use the new syntax. |
…to mcflugen/add-cxx-test
Instead of `class`, use `entry_point`, which is more generic.
…to mcflugen/add-cxx-test
This pull request does a couple things: add tests for wrapping C++ libraries, changes babel.toml (while maintaining backward compatibility).
The main change to babel.toml is to the library section: it is now a dictionary of dictionaries (or table of tables) and removes the entry_point key. The new format (in toml) looks like the following:
In yaml land this would be,
Using the old-style entry_points, the above is equivalent to HeatBMI=heat_bmi:Heat (notice the old-style doesn't specify a header file, which is a problem for some languages). Multiple
[library.*]
sections can be provided but, as of now, they all have to be of the same language.Another change is that the plugin section is now called package as it describes the newly-created Python package. The keys are the same, i.e.
The way things are right now, the above would create a new package called pymt_heat but I think we should change it so that a user proves the full name of the package (i.e.
name = pymt_heat
).