-
Notifications
You must be signed in to change notification settings - Fork 9
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
switched to meson build #8
base: master
Are you sure you want to change the base?
Conversation
Can you guys give scikit-build or scikit-build-core a try? Much simpler in my opinion. I'll take a look at the meson build system sometime this week. |
test it's use in https://github.com/hiddenSymmetries/simsopt/tree/cbs/test_pyoculus_meson, it is working, now vmec2000 is failing due to distutils/setuptools issues. I think meson build is the preferred method and probably more future-proof. Yes it is a new system, but for pyoculus I think it is the right tool. scikit build+setutptools+cmake(+distutils) is a bit more error-prone, and likely a contributing factor to the errors we are seeing. |
Do not merge, install is not configured correctly and |
Fair enough. Just read a little about meson. I thought meson was a python packaging tool. I am wrong. |
I think I have it fixed now, it is really frustrating how meson only has partial support for numpy.f2py compilation, and I kept getting issues with linking. Fixed it but had to hack a generator for the .so filename, which is probably not super future-proof, and might lead to frustrations on Windows... will address this together with the updates of @Akitzu. Currently simsopt is running it's gamut of tests on this, if it works, I will consider merging to fix simsopt CI. I chose meson because it seemed simplest for the task at hand, and CMAKE can be very hard to read. I think it is a bit cleaner than an equivalent CMAKE solution, but not by much. |
@zhisong @mbkumar is this fix 'good enough' to merge and fix simsopt CI? CMAKE/setuptools is not my forte, but the current distutils build is on the verge of being deprecated and has been frustrating for years. Sorry I cannot dedicate much more time for this. I don't like the .so naming hack, but currently mesons python_extension does not support f2py well and for me it does not link the built libraries correctly. This custom command works, but an output file is required, and this changes depending on architecture and such. For now I hope it will do. A more hacky way would be to have a script that finds the .so file and hard-copies it, that felt even uglier to me. |
.so extension name is used only for Linux. For Mac, the corresponding
extension name is .dylib. Can you please include Mac as well because a
significant part of the user base run simsopt on their laptops.
Bharat Medasani
…On Fri, Sep 6, 2024 at 6:15 AM Chris Smiet ***@***.***> wrote:
@zhisong <https://github.com/zhisong> @mbkumar
<https://github.com/mbkumar> is this fix 'good enough' to merge and fix
simsopt CI? CMAKE/setuptools is not my forte, but the current distutils
build is on the verge of being deprecated and has been frustrating for
years.
Sorry I cannot dedicate much more time for this. I don't like the .so
naming hack, but currently mesons python_extension does not support f2py
well and for me it does not link the built libraries correctly. This custom
command works, but an output file is required, and this changes depending
on architecture and such. For now I hope it will do.
A more hacky way would be to have a script that finds the .so file and
hard-copies it, that felt even uglier to me.
—
Reply to this email directly, view it on GitHub
<#8 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VEENO6XHKZAQPPVJFA3ZVF6F3AVCNFSM6AAAAABKRDMVFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTG4ZTOMRUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Switch to meson for the building of the FORTRAN sources, as distutils is deprecaded in python>3.12.
Have not tested the functionality of the compiled fortran, took me long enough to figure out how to pass compiler flags. @zhisong, could you have a look?
Also could you add your e-mail address to the pyproject.toml if you are happy to share?
Keeping it as a draft until tested.