-
Notifications
You must be signed in to change notification settings - Fork 732
WIP, BLD: meson, spin support #5122
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
base: develop
Are you sure you want to change the base?
Conversation
* All tests now pass locally except for `test_package_authors`, which depends on some author list magic happening in `setup.py` [skip ci] [ci skip]
@tylerjereddy - see discord, let me know if completing this might be worth getting an SDG for (edit: or if you're likely to get it done without by the UGM). |
* Add support for `spin build` and `spin test`. * Expand `meson` build/install support to include the testsuite. * The number of tests run appears to be correct, or very close to it, when using `spin`--on x86-64 Linux: `spin test -j 32`: `3 failed, 20525 passed, 820 skipped, 6 xfailed, 2 xpassed, 108949 warnings in 66.41s` vs. "old way": `python -m pytest MDAnalysisTests -n 32`: `20535 passed, 820 skipped, 6 xfailed, 2 xpassed, 176150 warnings in 73.78s (0:01:13)` [ci skip] [skip ci]
One thing that would be useful to know is what the core developers think the "fastest" possible from-source build incantation is on current MDAnalysis |
This is a very early stage/WIP PR that adds support for building MDAnalysis with the
meson
build system and thespin
developer tool, following much of the broader scientific Python library ecosystem. Whether we actually move forward with this has not been decided, and may rest on the reception of my upcoming UGM talk related to this thrust, higher bandwidth discussions about the matter after I present the pros/cons there, and then likely an online team decision after that (as usual).At the time of writing, it is possible to build this feature branch on ARM MacOS/x86-64 Linux with
meson
,meson-python
,ninja
installed locally withpip
(+ our usual deps), and steps that look like below (to be simplified once I addspin
support, then it would just be i.e.,spin build -j 12
). In my local testing, the full testsuite passes (on ARM MacOS/x86-64 Linux) for ameson
-built MDAnalysis except fortest_package_authors
which depends on some weird author list magic happening insetup.py
(with Python 3.11/Linux I also see an issue withtest_libmdaxdr.py::TestOffsets::test_seek_tell_largefile
, but that's about it).git checkout treddy_meson_expt
cd package
meson setup build --prefix=$PWD/build-install
ninja -C build
meson install -C build
export PYTHONPATH=$PWD/build-install/lib/python3.11/site-packages/
(again, this is NOT for a long-term workflow, just temporary for testing this out)cd ../testsuite/
python -m pytest MDAnalysisTests -n 12
TODO (this will probably grow...):
spin
support, sincespin build
andspin test
are just way nicer to develop/iterate withmeson
install (for now, I'm just cheating and running them from the source tree directly)test_package_authors
/author list handlingninja
build support and what we get withsetuptools
/current build system; perhaps "from scratch" and also comparing rebuild time for i.e, the same diff on a Cython/C file in both build systemsmeson
/ninja
).ninja
zipping through our build targets without the terminal noise📚 Documentation preview 📚: https://mdanalysis--5122.org.readthedocs.build/en/5122/