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

[tests] remove hard coded python version from lit tests #1546

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erick-xanadu
Copy link
Contributor

Context: Recently upgraded OS in my virtual machine. Reinstalled from scratch. Noticed this hard coded version.

Description of the Change: Remove hard coded python version from lit tests.

Benefits: Users / developers will be able to run lit tests with other python versions.

Possible Drawbacks: None?

Related GitHub Issues:

@erick-xanadu erick-xanadu requested a review from a team February 28, 2025 15:29
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@paul0403
Copy link
Member

paul0403 commented Feb 28, 2025

Does this mean all the "test wheels (python3.*) / frontend lit tests" have always been just 3.10? 😨

@erick-xanadu
Copy link
Contributor Author

@paul0403 maybe not, I think this is the default. Maybe the alternative is to configure the variable, but for some reason it didn't set. Let me keep this as a draft for now before merging.

@erick-xanadu erick-xanadu marked this pull request as draft February 28, 2025 15:55
@dime10
Copy link
Contributor

dime10 commented Feb 28, 2025

I think if you launch them through CMake, which the lit and test-frontend make targets do, the value for the executable is obtained from the CMake configuration. The fallback, if launching directly from the terminal via lit frontend/test/lit would be the python3.10 value.

The config is mapping the variable here:

config.python_executable = "@Python3_EXECUTABLE@"

@dime10
Copy link
Contributor

dime10 commented Feb 28, 2025

We can choose whatever we think is most appropriate as a fallback, probably python3? I think some systems don't define python if only Python 3 is installed, which can be annoying.

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.

3 participants