-
Notifications
You must be signed in to change notification settings - Fork 744
Stop using deprecated CMake code #13089
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
Conversation
Skipping CI for Draft Pull Request. |
Use the FindPython module instead of the deprecated FindPythonInterp module. Require a reasonably new version of CMake instead of 2.8.2 due to deprecated compatibility with CMake older than 3.5. Fixes: ComplianceAsCode#13073
1349f65
to
fa84309
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't any CMake warnings now.
What else is needed on this PR?
.github/workflows/gate.yaml
Outdated
python-version: '3.9' | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: 'x64' | ||
# You can test your matrix by printing the current Python version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these comments needed?
@Mab879 I need to make it work on Windows 😄 |
But the Windows Job seems to pass? What am I missing? |
it passes after the changes today |
The fail of static-checks test looks valid because the CMake now finds the Python 3.12 interpreter when it should use the python 3.6 and then it fails to find the python packages..
|
Setting the `Python_FIND_UNVERSIONED_NAMES` variable should tell CMake to prefer the "unversioned" python interpreter eg. `/usr/bin/python3` over other Python versions present on the system (eg. `/usr/bin/python3.12`). See https://cmake.org/cmake/help/latest/module/FindPython.html
Code Climate has analyzed commit 23bbc31 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 62.0% (0.0% change). View more on Code Climate. |
Use the FindPython module instead of the deprecated FindPythonInterp module. Require a reasonably new version of CMake instead of 2.8.2 due to deprecated compatibility with CMake older than 3.5.
In the Windows GH CI job we will set up a specific version of Python to avoid conflicts between multiple versions of Python present in the base Windows image.
Fixes: #13073