Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/cephPublic

cmake: fix unsatisfiable Python3 version requirement#66655

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
vxtls wants to merge2 commits intoceph:main
base:main
Choose a base branch
Loading
fromvxtls:patch-2

Conversation

@vxtls
Copy link

@vxtlsvxtls commentedDec 16, 2025
edited
Loading

Summary

The current CMake logic requiresPython3 3 EXACT while later rejecting
Python versions lower than 3.9. This creates an unsatisfiable requirement,
no Python version can satisfy both constraints.

This patch removes theEXACT qualifier from the Python3 detection so that
any Python 3 interpreter can be found, while preserving the existing check
that enforces Python >= 3.9.

This fixes source builds on modern distributions where Python 3.9+ is the
default , without changing runtime behavior.


Checklist

Tracker

  • Code cleanup (no ticket needed)

Component impact

  • No impact that needs to be tracked

Documentation

  • No doc update is appropriate

Tests

  • Tested on RHEL 8.10

Signed-off-by: VXTLS <187420201+vxtls@users.noreply.github.com>
The conflicting EXACT requirement was present both in the top-levelPython detection and in the distutils/pybind logic, so both were updatedconsistentlySigned-off-by: VXTLS <187420201+vxtls@users.noreply.github.com>
# Please specify 3.x if you want to build with a certain version of python3.
set(WITH_PYTHON3"3"CACHESTRING"build with specified python3 version")
find_package(Python3${WITH_PYTHON3}EXACTREQUIRED
find_package(Python3${WITH_PYTHON3} REQUIRED
Copy link
Contributor

Choose a reason for hiding this comment

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

the commit message of this change is practically empty, so one can hardly tell why the Python3 version requirement cannot be satisfied when reading this commit without tracking back to the pull request bringing this commit in.

the cover letter of this pull request states:

The current CMake logic requires Python3 3 EXACT while later rejecting Python versions lower than 3.9. This creates an unsatisfiable requirement, no Python version can satisfy both constraints.

But all Python versions greater or equal to 3.9 satisfy the requirement. that's why our CI/CD is not broken.

Also, we have good reason why we need to useEXACT here. Considering a user which installs Python 3.14 using tools like uv in a distro which ships Python 3.13 where all the building dependencies are in place, but they could run into a build failure, because the Python 3.14 is picked in favor of Python 3.13 despite that they configure the building system usingcmake -DWITH_PYTHON3=3.13.

Copy link
Author

@vxtlsvxtlsDec 17, 2025
edited
Loading

Choose a reason for hiding this comment

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

I reviewed the entire process again.
I useddo_cmake.sh for the build. Within that script, it determines the Python version based on the major version of the distribution, not which Python version the user has installed.
I suspect this is why, during my test builds:

  • When I initially used Python 3.6, CMake required 3.9(At least)
  • When I switched to Python 3.9, CMake required 3.6
    The 3.6 requirement likely originated fromdo_cmake.sh.

I'm still unclear why the required Python version is determined by the major version number indo_cmake.sh? may be we should fixdo_cmake.sh

Therefore, the current issue should have two possible solutions:

  1. Remove theEXACT keyword
  2. Modifydo_cmake.sh

I believe you should lean more toward the second option. Once confirmed, I will close this PR and open a new one fordo_cmake.sh

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tchaikovtchaikovtchaikov left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vxtls@tchaikov

[8]ページ先頭

©2009-2025 Movatter.jp