pyproject definition by emanuel-schmid · Pull Request #1067 · CLIMADA-project/climada_python

What about this? https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata

We can place the contents of env_climada.yml into a requirements.txt file and have the pyproject.toml reference that file:

[project]
dynamic = ["dependencies"]
# ...
[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}

This is still considered a beta feature, but we could give it a try. Of course, the requirements.txt specifications are a bit different from conda environment specs.

requirements.txt files are supported by the conda commands conda create and conda install, therefore a new environment could be created by

conda create -n new_env --file requirements.txt python="3.11.*"