-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Add module sage.config as alternative to sage.conf package #37136
Conversation
Why would reading from a package named |
I mentioned one reason briefly here: #36524 (comment) Having a separate place to store meson-detected configuration allows us to migrate checks one-at-a-time from the distro |
I don't see the point either. Runtime configuration should go into For building, picking stuff from standard locations is ok; at most a lean easy way to configure alternate paths. AFAICT not even building the |
@orlitzky This certainly makes some sense, but I'd urge to take the modularization into account in the design. The idea that there is one build step for the Sage library with integrated configuration, and one build-time generated configuration file that is read at runtime seems to hinge on having a monolithic Sage library provided by one Python distribution package. |
What do you need to manually type so that |
We just saw an example recently: Fedora renames You might say that example is invalid or that fedora is stupid, but similar "relocations" happen all the time and pkg-config exists to make them easy. |
Having a separate module for meson configuration would be an interim measure. Once meson can perform all of the required checks, it should just write the values into the python files directly like autoconf does with |
It's probably tangential to this discussion, but both names, |
Where would these source files live, and what would be their relation to |
IMHO the idea of splitting sage library has proven itself too costly, both technically and socially. There is a very clear line to cut the project and reduce complexity, and that is split of the library from the rest of the world. I think there's ample consensus for this split. Let's finish it. All the other lines are kind of artificial and it all seems to end up adding complexity instead of reducing it. And it seems to be causing a lot of social and technical friction. |
I don't think I understand the question. They could live anywhere, either in a separate repo, or in the monorepo. So long as they have their own meson-based build systems that can make |
@tornaria It's OK if you're not interested in the modularization. |
OK, then why would we introduce the monolithic |
As an interim measure, so that every |
I think we can come up with a solution that aligns with the 0-1-infinity rule |
Seems reasonable, we talked about this in the other PR. I looked a bit into this, but the code is not very well organized, it would take some effort. It seems to need a good discussion / brainstorming / design before we keep coding the thing with differing styles and goals. I don't like that to implement a feature (which is, after all, a small piece of meta-configuration) requires so much boilerplate (and useless-looking doctests which are there just to keep the burocracy straight) It may be worth looking if there's another project with similar needs, or an independent python package that suits us. |
Because it's easier to add a file under the |
Can we get this in please? I think we all agree that the config should be removed in the long term, but until then this convenience fall-back doesn't hurt. |
It might be nice to add an empty If we're on the sage page: it's a sage-conf replacement to hold the configuration detected by the (new) dedicated sagelib build system. It allows us to port I'm in favor of this, but I don't think it makes sense to merge it until there's a resolution to the "disputed" on #36524 |
In principle a good idea, but then a bit more work may be needed to handle the "empty but present case" (currently we can just handle the absence via |
Documentation preview for this PR (built with commit 30021de; changes) is ready! 🎉 |
I don't think anything like this should be checked at runtime. ecm/gmp-ecm should be recognised at config/build time, and then assumed to be present (if one of these is present). If ecm/gmp-ecm was present, but is now gone, Sage should just be allowed to error out. |
Whenever we read such declarations, it seems that lots of assumptions have been made about the deployment scenario. |
No longer needed. |
Add a fallback option
src/sage/config.py
to specify the runtime config (as an alternative to the sage.conf package). This should help with downsteam packaing and is part of #36524.📝 Checklist
⌛ Dependencies