-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
sagemath-standard: some fixes in build dependencies #37894
Conversation
For the record, I switched void-linux package to pypi sdist and it's working fine with networkx 3.3 and it doesn't use jupyter_core or pplpy as build time dependencies (it does have them as runtime dependencies so it will install them for testing). |
I am fine with removing the limit to networkx-3.3, but instead of dropping the upper limit completely we could make it 3.4 as a measure of future proofing just in case. |
Documentation preview for this PR (built with commit 556ebe6; changes) is ready! 🎉 |
And then we have to patch at every version update, which is more inconvenient. In fact, very few packages have an upper bound
At least the other three cases have an upper bound given as a major version change (cython<4, sphinx<8 and sympy<2).
I just tried to use pip to build from pypi using all system packages and it did build networkx because it didn't like my networkx-3.3. So I guess this is a "runtime" dependency, but it triggered to me when building. Indeed, without this patch, my package reports this error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
that's rather a measure of creating more makework. I'd rather see no upper limit at all. |
That's not relevant because |
@dcoudert Any opinion on future-compatibility of our use of networkx in sage.graphs? |
@kiwifb It's correct that what is declared in This is the separation of phases per PEP517/518/660. Per this separation of phases, ordinarily, we would normally not even have to look whether anything in the Sage library However, we are currently breaking the separation of phases by putting "." in That some "jupyter*" appeared in these dependencies at all can probably be attributed to the installation of the kernel spec in https://github.com/sagemath/sage/blob/develop/src/sage_setup/command/sage_install.py#L28 via (Note that the poorly motivated re-integration of |
I have not followed the recent developments of networkx (new functions, deprecations, etc.) but the roadmap does not indicate major changes and mention the will to improve interoperability with other tools. If needed, we can reduce our dependency to networkx (deprecate use of networkx when we have reliable and faster methods, code some methods instead of calling the networkx one and paying a transformation of the data structure, etc.). |
The troubles with Jupyter kernel are due to vendoring Jupyter in sage distro. If it was just an optional pip package, we'd have figured out proper ways of installing the kernel years ago. |
What are you talking about. There's no "trouble with the Jupyter kernel". |
About the jupyter kernel install:
I don't see as a big deal if there's a reason to build-depend on OTOH, jinja2 is necessary for the interpreters autogen (which is run in build_wheel, not in bootstrap). I mention this because I saw a PR somewhere removing jinja2, but it does not work. |
Also note: when the wheel is built, there's no information on the install system. The only point in time when it would make sense to use Thus, the only reasonable way is to install the files in |
I'll say that jupyter_core was not a bother to me. I did figure out that we do not use it anymore for kernel install and using jupyter is clearly an optional thing. But pplpy would be needed at runtime even if it is not at build time. Which is why I asked about whether the dependencies in pyproject.toml are supposed to cover runtime. The comment on the file does suggest build time is all that is required but when you install something with pip, pip needs to know about runtime dependencies if you want the install to be functional. And that's the only place pip can pull runtime dependency as far as I can see. |
We should also provide a script for users to install the kernel into a different environment, see #30298. |
Yes, that is currently done in setup.cfg (install-requires), which is to be moved to a different section of pyproject.toml |
Thanks for the clarification. |
Yes,
No, we removed it from the required dependencies of sage-setup because most of the modularized distributions that use sage-setup do not need it. We made it an optional dependency (extra-requires), which is then added by those few distributions that need it. |
Neither jupyter_core nor ppl are needed to build.
- [build-system] requires: neither jupyter_core nor ppl are needed to build sagemath-standard. - networkx: remove upper bound since 3.3 works just fine. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: sagemath#37894 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik
- [build-system] requires: neither jupyter_core nor ppl are needed to build sagemath-standard. - networkx: remove upper bound since 3.3 works just fine. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: sagemath#37894 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik
- [build-system] requires: neither jupyter_core nor ppl are needed to build sagemath-standard. - networkx: remove upper bound since 3.3 works just fine. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: sagemath#37894 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik
- [build-system] requires: neither jupyter_core nor ppl are needed to build sagemath-standard. - networkx: remove upper bound since 3.3 works just fine. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: sagemath#37894 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik
This broke |
I'm fixing this as part of #37902. |
📝 Checklist