Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci-conda: change spelling of python dependency #214

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

jameslamb
Copy link
Member

@jameslamb jameslamb commented Dec 2, 2024

Proposes changing the spelling of the Python dependency for conda builds here from something like this:

python~=3.11.0=*_cpython

to something like this:

python>=3.11,<3.12.0a0=*_cpython

To work around an issue with parsing ~= in recent versions of mamba.

References:

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Dec 2, 2024
@jameslamb
Copy link
Member Author

It looks to me like this is working! For example, in a successful miniforge-cuda Python 3.11 build, I see the following:

  PYTHON_VER=3.10 
  PYTHON_VER_UPPER_BOUND=3.11.0a0 
...
#10 26.22   added / updated specs:
#10 26.22     - python[version='>=3.10,<3.11.0a0',build=*_cpython]
...
#10 26.22   python                          3.12.7-h5d932e8_0_cpython --> 3.10.15-hbf90c55_2_cpython 
#10 26.22   python_abi                                   3.12-5_cp312 --> 3.10-5_cp310 

(build link)

@jameslamb jameslamb changed the title WIP: ci-conda: change spelling of python dependency ci-conda: change spelling of python dependency Dec 2, 2024
@jameslamb jameslamb requested a review from bdice December 2, 2024 18:52
@jameslamb jameslamb marked this pull request as ready for review December 2, 2024 18:52
@jameslamb jameslamb requested a review from a team as a code owner December 2, 2024 18:52
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. For awareness, in the past we just used pinnings like python=3.10. See here for historical context: https://github.com/rapidsai/miniforge-cuda/pull/52/files

@jameslamb
Copy link
Member Author

in the past we just used pinnings like python=3.10

That would definitely be simpler, and as far as I know should still achieve what we want.. @jakirkham what was the reason for switching from = to ~= in rapidsai/miniforge-cuda#52?

Looks like that was also carried over to this repo #167, but I don't see any discussion about it there. (cc @hcho3 in case you remember)

I'll merge this right now to unblock CI, but would be happy to come back and switch this to = (+ revert this logic about setting an upper bound) if we find out that that would work just as well.

@jameslamb jameslamb merged commit cd4e49c into rapidsai:main Dec 2, 2024
407 checks passed
@jameslamb jameslamb deleted the fix/spec branch December 2, 2024 19:02
@bdice
Copy link
Contributor

bdice commented Dec 2, 2024

Also in #207 I had to add some logic to use a different build tag. It would be easy to compute the upper bound there rather than supplying it as an input. We can discuss on that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants