8000 Stop using deprecated CMake code by jan-cerny · Pull Request #13089 · ComplianceAsCode/content · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 5 commits into from
Feb 27, 2025

Conversation

jan-cerny
Copy link
Collaborator
@jan-cerny jan-cerny commented Feb 20, 2025

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

Copy link
openshift-ci bot commented Feb 20, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Feb 20, 2025
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
@jan-cerny jan-cerny added the Infrastructure Our content build system label Feb 20, 2025
@Mab879 Mab879 self-assigned this Feb 25, 2025
Copy link
Member
@Mab879 Mab879 left a 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?

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
Copy link
Member

Choose a reason for hiding this comment

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

Are these comments needed?

@jan-cerny
Copy link
Collaborator Author

@Mab879 I need to make it work on Windows 😄

@jan-cerny jan-cerny added this to the 0.1.77 milestone Feb 27, 2025
@Mab879
Copy link
Member
Mab879 commented Feb 27, 2025

@Mab879 I need to make it work on Windows 😄

But the Windows Job seems to pass? What am I missing?

@jan-cerny
Copy link
Collaborator Author

it passes after the changes today

@jan-cerny jan-cerny marked this pull request as ready for review February 27, 2025 13:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Feb 27, 2025
@jan-cerny
Copy link
Collaborator Author

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..

-- Found Python: /usr/bin/python3.12 (found version "3.12.1") found components: Interpreter 

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
Copy link
codeclimate bot commented Feb 27, 2025

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.

@Mab879 Mab879 merged commit 224983d into ComplianceAsCode:master Feb 27, 2025
111 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake shows deprecation warnings, will break in the future
2 participants
0