ghislainv / forestatrisk

📦🐍 Python package to model and forecast the risk of deforestation
https://ecology.ghislainv.fr/forestatrisk
GNU General Public License v3.0
116 stars 27 forks source link

Remove `numpy.distutils` dependency #88

Open thomasarsouze opened 1 month ago

thomasarsouze commented 1 month ago

forestatrisk currently uses numpy.distutils which is now deprecated

Follow the migration advice to get rid of it, and make forestatrisk work with numpy>=1.23 and python>=3.12.

ghislainv commented 1 month ago

Done, see e5e4872.

thomasarsouze commented 1 month ago

This was done a bit too fast actually !

We are facing this problem where numpy is now needed for the setup, but is not installed in a clean environment.

Setuptoolofficial solution is to add a pyproject.toml file. This is what is proposed in the PR, although not ideal right now as there is a mix of pyproject.toml and setup.py (and setup.cfg). All this should be merged into a single pyproject.toml later on.

ghislainv commented 1 month ago

OK, thanks. In previous versions of forestatrisk we also needed to install numpy previously to forestatrisk. But it is cleaner that way. I let the issue open until we merge pyproject.toml and setup.py.