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

Make finding python version more robust #1927

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nhat-nguyen
Copy link
Contributor

Starting from cmake 3.15, the Python_FIND_STRATEGY variable was introduced and can take 2 values:

  • LOCATION: stops lookup as soon as a suitable python version is found. This is the NEW behavior for this policy.
  • VERSION: finds the most recent python version. This is the OLD behaviour or when CMP0094 is undefined.

Using the NEW policy will make our builds more robust because the most recent python version installed isn't necessarily compatible.

Signed-off-by: Nhat Nguyen honguye@microsoft.com

Signed-off-by: Nhat Nguyen <honguye@microsoft.com>
Signed-off-by: Nhat Nguyen <honguye@microsoft.com>
@jenkins-droid
Copy link
Collaborator

Can one of the admins verify this patch?

@AlexandreEichenberger
Copy link
Collaborator

If its ok with you, by updating the branch it get the latest and run the full tests (since I am an approved user for the Jenkins). You will have to refresh your local branch.

# is found.
if (POLICY CMP0094)
cmake_policy(SET CMP0094 NEW)
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this requires 3.15, the minimum required cmake version (currently 3.13.4) should be bumped up to 3.15.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gongsu832 would it be fine to bump to 3.15? Or are we help back to lower version because of some dependence?

@nhat-nguyen would you be willing to try moving us up to 3.15 if appropriate? Tx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

definitely, i can try moving us up to 3.15

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually we currently use 3.13.4 because that's what llvm uses. There is a comment in llvm that starting from llvm 17 they will require cmake 20.2 and they suggested to move up to 20.2 directly. This would require we move our Ubuntu base docker image from focal to jammy. I will create a PR to do that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gongsu832 please link the PR so @nhat-nguyen will know when we may proceed with this one, thanks

@sstamenova
Copy link
Collaborator

There's now a PR to bump the min version to 3.20. See #2064 . This change could land after it completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants