icecube / nuflux

A library for calculating atmospheric neutrino fluxes.
https://docs.icecube.aq/nuflux/main
GNU Lesser General Public License v3.0
15 stars 5 forks source link

Switch Python build system to use mesonpy instead of setuptools #24

Closed kjmeagher closed 7 months ago

kjmeagher commented 9 months ago

This PR solves a couple of problems at once. I got an email from a user complaining that the setuptools build system couldn't handle multiple photospline and boost being in different directories. Meson's pkg-config dependency detection is far superior to anything you can ad hoc program in setuptools. This allowed some cleanup that I had wanted to do regarding the meson build file. Also, one of the reasons that I gave up on making wheels for nuflux was that setuptools couldn't figure out how to include header files while mesonpy does this automatically. The files changed looks big but that is just because I also moved the python source directory to /src/.

The only change from the user perspective is that when compiling you now use exactly the same env vars for both meson and python. Documentation has been updated to reflect this. cvmfs target py3-v4.0.1 was dropped because the last version of meson that worked with python 3.6 doesn't support the pure option for python. And py3-v4.2.1 was dropped because mesonpy doesn't play well with the python misconfiguration present in that version of cvmfs.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (07ab4b1) 56.36% compared to head (a7973b4) 56.94%.

Files Patch % Lines
src/library/SplineFlux.cpp 37.50% 2 Missing and 3 partials :warning:
src/library/ANFlux.cpp 0.00% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #24 +/- ## ========================================== + Coverage 56.36% 56.94% +0.57% ========================================== Files 13 13 Lines 715 713 -2 Branches 326 323 -3 ========================================== + Hits 403 406 +3 + Misses 130 128 -2 + Partials 182 179 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kjmeagher commented 7 months ago

The deprication warnings were from code in boost python. The only way to get rid of them is adding -Wno-deprecated which I did. The install warnings were coming from symlinks wich were unnescessary so I removed them. The readme and meson_options were updated to be more clear that the data directory is where the raw flux tables are stored and a issue was submitted to cmvfs about adding the needed envvars.