-
Notifications
You must be signed in to change notification settings - Fork 8
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
Minimum cmake version #6
Comments
I did some tests and it looks like the oldest version of CMake where On the one hand, I don't want to constrain projects that don't need it by requiring a newer version, but on the other hand, I expect it to be a common use case to find Python in CMake when building Python packages, and the results are pretty bad if CMake somehow selects a different Python installation than the one you're using to build the package. I feel like silently installing a newer version of CMake is better than silently generating a broken package because of an old version. As a middle ground, I would propose using |
That's an interesting problem. I've rolled it around my head a bit and I have a number of questions that I'd want answers to before I'd feel confident supporting a particular solution. I propose that we fork that problem to a new Github issue where we can discuss it further. In the meantime we can still solve the cmake CLI compatibility problem in front of us, which I believe is both well-defined and has a clean solution (something like I formulated above). |
It looks like c9a3950 should correctly resolve this. Thanks! Feel free to close this issue unless you want to continue related discussions here. W.r.t. For now, it seems the simplest thing to not make any formal claims of |
In the process of testing #5, I ran into a separate issue with cmake version requirements. It looks like py-build-cmake itself requires at least CMake >= 3.15, if not newer. I identified this lower bound is based on support for the
cmake --install
CLI option (see CMake 3.15 Release Notes).Logically: let py-build-cmake's min version be
A
(e.g.,3.15
), the user's declared minimum version beB
(None --> 0.0
), and the existing system cmake version beC
(None --> 0.0
). IfD = max(A, B)
, then it seems you should add thecmake >= D
Python package dependency ifD > C
.FWIW, I use
cmake --build <dir> --target install
to install on older cmake versions, but I'm not sure how cleanly that maps to your approach since it forces a "build" step as part of the install process.The text was updated successfully, but these errors were encountered: