ecmwf / climetlab

Python package for easy access to weather and climate data
Apache License 2.0
374 stars 57 forks source link

Problem to use climetlab without ecmwflibs on Python 3.12 #69

Open thebaptiste opened 5 days ago

thebaptiste commented 5 days ago

What happened?

I'm using climetlab without ecmwflibs on Python 3.12. I was using release 0.20.1 with CLIMETLAB_DO_NOT_INSTALL_ECMWFLIBS=1, building myself eccodes and other packages such as Magics from sources (see this commit in which ecmwflibs was not required anymore to install climetlab which I think was a great improvment) I try to upgrade to last climetlab release 0.24.0 and, damned, ecmwflibs is back again as a required dependency with constraint ecmwflibs>=0.6.3. As ecmwflibs 0.6.3 doest not provide wheels for Python 3.12 I can't use climetlab anymore. So please, remove ecmwflibs as a required dependency of climetlab ! It should only be an optional dependency as ecmwflibs is too big to provide all wheels for each release.

What are the steps to reproduce the bug?

pip install climetlab==0.24.0 under Python 3.12

Version

v0.24.0

Platform (OS and architecture)

RockyLinux 8

Relevant log output

INFO: pip is looking at multiple versions of climetlab to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement ecmwflibs>=0.6.3 (from climetlab) (from versions: none)
ERROR: No matching distribution found for ecmwflibs>=0.6.3


### Accompanying data

_No response_

### Organisation

Meteo-France
thebaptiste commented 4 days ago

May be a way to set ecmwflibs as an optional dependency would be to set dependencies as "dynamic" in pyproject.toml and set them in setup.py with a python test on environment variable CLIMETLAB_DO_NOT_INSTALL_ECMWFLIBS. See here for usage of setup.py in complement of pyproject.toml for the dynamic part.