-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
downgrade giac to optional #38712
base: develop
Are you sure you want to change the base?
downgrade giac to optional #38712
Conversation
In preparation for adding a --disable-giac option, we add a new feature that detects the presence of the "giac" executable. We already have a feature for sage.libs.giac, but that only guards the libgiac interface; we still have code that runs "giac" behind pexpect. This will allow us to skip those tests when giac is not installed.
Various implementations get it a little (1e-10) different.
…wers We have an integration test in this file that is looking for the giac result, but sympy gives an equivalent one. We should accept that, too.
There's one piecewise test that uses algorithm='giac', but it will soon be possible to install sage without giac. We could make the test conditional on giac's presence, but the same thing works with sympy, so let's just use that.
The dependencies are rebased over the latest beta5 |
Documentation preview for this PR (built with commit a451352; changes) is ready! 🎉 |
This works if giac needs to be built. But if a system-wide giac is detected and approved for use, then feature giac is detected, and doctests are run, even though we don't want it in case we configure with So EDIT - fixed by d47e633 |
I tried testing locally, this "Build & Test / test-new (pull_request)" seems to be failing due to a shortcut taken by this CI step. |
Is this supposed to make it optional only at runtime? Because it still fails to build if giac is not present. |
to build, you need to configure with |
I'm building sagelib (aka sagemath-standard), not sage-the-distro. And if giac is not installed, build fails with
|
I've added explicit testing instructions in the description |
Of course the extension modules can no longer be built and shipped by sagemath-standard when the package is made optional. They need to go into a new distribution, along the lines of sagemath-bliss etc. (and sagemath-brial as done in #36380. |
Why would you expect sagelib to be able to build giac? Building giac is something entirely different. As we don't have a standard, documented, procedure for building a standalone sagelib, We really should get on with getting a common way to build sagelib standalone, in particular as it's basically done in #36524, so we should get on with getting #36524 fixed and merged, document it, etc. @tobiasdiez |
@dimpase me and a lot of other distro have managed to build sage as modular parts and in fact it is the only proper way to do it anymore as a distro in my opinion. sage upstream (aka you) should get on and eat your own food properly. One thing modular sage has done for us that is extremely positive is split those optional packages that had a terrible build system involving detection in sagelib at build time. Now we can build them independently and that's a good thing(TM). And if you are going to make giac optional, I am expecting you to go all the way and create a sagemath-giac package. Anything else is half backed and will be disputed by me. |
@dimpase What are you talking about. The sagemath-standard distribution on PyPI exists for this very purpose. |
There is no documentation on how sagemath-standard is built. There is some talk about sagemath-standard in src/doc/en/developer/packaging_sage_library.rst, but it leaves one in the dark on how one can build it in a stand-alone mode. One can put as much sagemath-* stuff on PyPI as one pleases, but it's not replacing documentation. |
I fully agree with you here.
We have a problem defining the diet, as you know.
giac is much more half-baked, as you perfectly know. I don't want to spend my time writing endless undocumented configs for something that's broken beyond repair. If you want a sagemath-giac package so badly, you can work on it in a follow-up PR, but downgrading a package to optional should not take more time and effort than is already taken. It used to be easy, and it should stay so. |
Please point out at the place where creating packages such as sagemath-brial is documented in sufficient detail (or even is some detail). There is no such place. Or point me to this place, because I cannot find it. |
@dimpase You probably want to manually add the files that need giac (like Line 83 in d1f99d1
pip install will try to compile them, which fails with the error mentioned in #38712 (comment). This will indeed become way easier and, in fact, automatic with the Meson build system which is able to track such dependencies.
|
Why can't you split it out before unrelated to it #36380 is merged? If you do it, add it here (the PRs on https://github.com/dimpase/sage are open), we'll get this PR done and dusted, instead of starting yet another fight. Or do it in a follow-up PR, if you prefer, do not block this one. |
Thanks for the pointer! I see in that file
which appears to be a semi-random list of optional packages - or are these "distributions" ? Yes, indeed, these are used to form
By the way, why isn't |
Because that would be less convenient. |
"distribution" is the same as "distribution package" is the same as "pip-installable package". |
They are indeed intended to be used in conjunction with |
I don't see how maintaining explicit lists of optional things, while mixing up non-optional and optional things in the same directory is more convenient than putting optional things in optional/ |
It may be easier to do this in a few steps to ensure that no one objects to them. A few related PRs were merged into |
@orlitzky - I am not sure what you are proposing to be split here. I think the modifications in this branch are needed regardless. |
Not split per se, but I think you are getting a lot of negative comments because this branch would break some things without the prerequisite |
I think I've already put in the equivalents of #needs tags in. There is a per file analog of these ( Perhaps this tag is not needed in |
This removes sage.libs.giac from the default build, but without the corresponding sagemath-giac distribution, I think there's no easy way to re-enable it.
@mkoeppe would you be willing to split it out to see what happens? After #38770 this is the last step. |
I thought about adding Or create a giac distribution but make it require sagelib during build time, then one doesn't need to change sage-categories for it to build successful. |
Please no. Just no. My opinion on this is well known, we should not mix sage meta build package management with "sagelib" build or runtime system. |
+1. |
Okay, fair enough. For another PR: should we remove |
I would be in favor of that. |
This will resolve #38668
It's actually almost done, we just need to change the package type, and make sure that an external
giac
does not get picked up by feature if--disable-giac
is in effect.For the latter, we substitute the value of an automatically generated variable
SAGE_ENABLE_giac
into a variable insage.env
, and use it insage.feature.giac
to poison the executable name if
giac
is disabled.(maybe there is a better than poisoning way)
Testing:
📝 Checklist
⌛ Dependencies