sage --package list: Sort output, add switches --{in,ex}clude-dependencies#36393
Conversation
|
Documentation preview for this PR (built with commit 887030f; changes) is ready! 🎉 |
|
Do we have a notion of "top level" package yet, or is that TBD? I ask because things like Unrelated, this outputs a list of packages, but this, outputs nothing. IIUC they should do the same thing? |
No, this cannot be declared yet (any thoughts?); for use in #35593 I just with
Without the new switches, the default is indeed :all:, which is nice for interactive use. But with the new switches given, I have changed the default to empty, which works better for scripting uses. |
It's hard to do properly without writing a package manager. The entries in We may wind up with a hard-coded list for a while., but at least the distribution maintainers have already come up with that list (they should all be roughly the same).
Can the |
Good idea, done |
orlitzky
left a comment
There was a problem hiding this comment.
I'm not sure that this in-between approach is how I'd do it: if we came up with that list of direct dependencies now, we might also be able to find a way to hide the other packages from ./configure and make. That would be nice for conda and the distros because the package manager install instructions would contain only a minimal list, and ./configure would be able to skip a few hundred pointless checks for non-direct dependencies.
Still, this doesn't hurt anything, so it's OK too.
|
Thanks! |
|
Merge conflict |
…ncies, handle --exclude at the end
…tu-xenial` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> On `centos-7`, still supported until June 2024, we have to use sage- bootstrap-python = python2. Support for Python 2 was broken accidentally in sagemath#36393, see https://gith ub.com/sagemath/sage/actions/runs/6520548150/job/17767608828#step:10:192 7 Fixed here, as tested with `tox -e docker-centos-7-devtoolset- gcc_11-standard -- config.status`. Same issue also affects `fedora-30`, which is still tested by the CI as a proxy for old RHEL, and `ubuntu-xenial`. See sagemath#32074 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36476 Reported by: Matthias Köppe Reviewer(s): Tobias Diez
We enhance the command
sage --package list:--{in,ex}clude-dependencieswalk the tree of dependencies declared independenciesfilessortin various scripts--excludeis moved to the end, which improves its applicability.The new parsing of the
dependencies*files insage_bootstrapis generic preparation for handling more of the bootstrapping phase in Python, as sketched in #33860 (part of #29146).This PR is immediate preparation for #35593, where it is desired to create "minimized" lists of system packages that do not include all standard packages that are really only needed as dependencies of "top-level" packages.
📝 Checklist
⌛ Dependencies