Open dgarnier opened 2 months ago
Yup, hopefully we'll get rid of ascot2py.py someday as we implement the python interface properly. I wasn't aware that there would be an issue with the name mangling but your solution looks clean. So if that works, I'm happy with it. I'll still have to check that all the changes to the Makefile are something that cannot be handled easily with environment variables (I only had a quick glance now).
We currently have a major merge in progress as the GPU branch is being worked, but I'll come back to this once that is done!
Cool. Let me know what you are thinking of for getting rid of ascot2py.py. I've recently moved my code (dipole equilibrium code) over using pybind11 in combination with scikit-build-core for the packaging. Works nicely. (Although, I might use "nanobind" instead of pybind11 now that I found out about it and it seems to have a smaller / more direct connection between c++ and python). In the meantime, I'll rebase my patch so its easier to evaluate.
To get code to run through tests and tutorials on MacOS.. made some changes mostly to src/Makefile. Also had to make a new abstraction since the structure naming convention on MacOS with clang-17 (which is what I used) has different "mangling". Interestingly, the mangling looks simpler with the newer clang. In general though, ascot2py.py looks different on MacOS arm due to different "long double" and packing. So that file should probably not be kept in the repo.. though I didn't remove it.
I also have a version of this commit against the main branch, but I'm assuming develop with eventually be pulled and this saves a later conflict merge resolution and additional fixes.