Closed Shalmezad closed 5 years ago
Nice! This looks better, for sure. What change did you require for your own work? I can't find this easily from your commit history. I am nearing completion of a new mbuild to eschew the dependency on python for configuration and building. We will leave the python one as an alternative so this PR is definitely useful.
@JorySchossau The small change I needed was to add extern "C"
to the function configureDefaultsAndDocumentation()
in modules.h like so:
https://github.com/Shalmezad/MABE/blob/pythonBindings/pythonTools/mbuild.py#L198
So that it can be bound to a python method:
https://github.com/Shalmezad/MABE/blob/pythonBindings/pythonBindings/ModulesWrapper.py
Playing around a bit trying to make python bindings for MABE as a small side project.
checks out... merging.
Needed to make some changes to mbuild.py for a small thing I'm working on, found it was a bit messy so I refactored it a bit.
Main changes are:
pythonTools/mbuildlib/modulewriter.py
)pythonTools/mbuildlib/projectwriter.py
)getSourceFilesByBuildOptions
to use an array of dictionaries rather than an array of arrays, that way fields can be referred to by name (ie:unit['filename']
) rather than an index (ie:unit[f_filename]
).I did test generating each of the projects on my machine, however I'm unable to check whether there's any issues with them, so please be sure to thoroughly test before merging in please.