conda-incubator / setup-miniconda

Set up your GitHub Actions workflow with conda via miniconda
https://github.com/marketplace/actions/setup-miniconda
MIT License
407 stars 70 forks source link

Support installing Python release candidates #365

Open dstansby opened 1 month ago

dstansby commented 1 month ago

For testing purposes, it would be nice to be able to install Python pre-release versions, for example Python 3.13.0rc2 is currently available on conda-forge. When I tried to set the Python version to 3.13.0rc2, I got the error (see GH actions run here):

Sun, 15 Sep 2024 08:13:17 GMT
Run conda-incubator/setup-miniconda@v3.0.4
Sun, 15 Sep 2024 08:13:17 GMT
Gathering Inputs...
Sun, 15 Sep 2024 08:13:17 GMT
Creating bootstrap condarc file in /home/runner/.condarc...
Sun, 15 Sep 2024 08:13:17 GMT
Ensuring installer...
Sun, 15 Sep 2024 08:13:18 GMT
Running installer...
Sun, 15 Sep 2024 08:13:23 GMT
Setup environment variables...
Sun, 15 Sep 2024 08:13:23 GMT
Parsing environment...
Sun, 15 Sep 2024 08:13:23 GMT
Configuring conda package cache...
Sun, 15 Sep 2024 08:13:24 GMT
Applying initial configuration...
Sun, 15 Sep 2024 08:13:26 GMT
Initializing conda shell integration...
Sun, 15 Sep 2024 08:13:29 GMT
Adding tools to 'base' env...
Sun, 15 Sep 2024 08:13:29 GMT
Ensuring environment...
Sun, 15 Sep 2024 08:13:29 GMT
Updating 'test' env from conda create (simple)...
Sun, 15 Sep 2024 08:13:29 GMT   /home/runner/miniconda3/condabin/mamba create --name test python=3.13.0rc2
Sun, 15 Sep 2024 08:13:39 GMT   
Sun, 15 Sep 2024 08:13:39 GMT   Looking for: ['python=3.13.0rc2']
Sun, 15 Sep 2024 08:13:39 GMT   
Sun, 15 Sep 2024 08:13:39 GMT   Could not solve for environment specs
Sun, 15 Sep 2024 08:13:39 GMT   The following package could not be installed
Sun, 15 Sep 2024 08:13:39 GMT   └─ python 3.13.0rc2**  is not installable because it requires
Sun, 15 Sep 2024 08:13:39 GMT      └─ _python_rc, which does not exist (perhaps a missing channel).
Sun, 15 Sep 2024 08:13:39 GMT
Sun, 15 Sep 2024 08:13:39 GMT Error: The process '/home/runner/miniconda3/condabin/mamba' failed with exit code 1
jaimergp commented 1 month ago

You need to add the python_rc label channel I think.

dstansby commented 1 month ago

Ah yes, that seems right: https://conda-forge.org/docs/maintainer/knowledge_base/#installing-a-pre-release-build

Do you know how to pass labels to the setup-miniconda action? They don't seem to be mentioned in the README.

dstansby commented 1 month ago

Ah, passing channels: conda-forge, conda-forge/label/python_rc seems to have worked. Would you be open to me adding how to do this to the README of setup-miniconda?

jaimergp commented 1 week ago

Sorry for the delay, yes go for it!