Conversation
|
It would be natural to print like Why accept multiple |
So that a shell script can request this information in bulk instead of invoking this script many times. |
|
Would you point where the suffixed string is used? |
|
In https://github.com/sagemath/sage/pull/36740/files#diff-b1f0deab6b85906bd925c4fceb337406ebea20bdc199c63996977328d24cf5c5R347, take a look at:
|
|
I see. You use the output directly to define variables... I think the command should accommodate two uses: standalone and as pipeline. |
|
How about adding an option |
|
I'm open to creating output format options when needed (as you may have seen in #36740, |
|
A use case is just to read the output of |
|
We already have a tool that formats package info for human inspection, that's |
|
But |
|
|
|
If the command is internal and not exposed to developers, I won't care the output format. But it is exposed and developers may use it and read the output, and then the output should be in a readable format. Currently the format is only suitable to shells. (I wonder if I misunderstand something...) |
|
OK, that makes sense, I'll add an option. |
|
How's this? |
|
Thanks. Looks good to me. |
|
Thank you! |
sagemathgh-37018: `sage --package properties` <!-- ^^^^^ 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 --> For example: ``` $ ./sage -package properties --format shell gap ecl git:sage_package_properties path_ecl='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/ecl' version_with_patchlevel_ecl='21.2.1' type_ecl='standard' source_ecl='normal' trees_ecl='SAGE_LOCAL' path_gap='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/gap' version_with_patchlevel_gap='4.12.2' type_gap='standard' source_gap='normal' trees_gap='SAGE_LOCAL' ``` The output is suitable as input for `eval` in Bourne shell. (The default output format is more human-friendly.) <!-- Why is this change required? What problem does it solve? --> Split out from: - sagemath#36740 where this new interface is used to eliminate direct references to `build/pkgs/` from various scripts and reduce code duplication and complexity in reading SPKG metadata. <!-- 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#37018 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
|
Do all supported platforms use python3 as the "default" python? I'm getting: |
|
Sorry about this. No, we still support python 2.7 as sage-bootstrap-python; see #35858. |
sagemathgh-37018: `sage --package properties` <!-- ^^^^^ 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 --> For example: ``` $ ./sage -package properties --format shell gap ecl git:sage_package_properties path_ecl='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/ecl' version_with_patchlevel_ecl='21.2.1' type_ecl='standard' source_ecl='normal' trees_ecl='SAGE_LOCAL' path_gap='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/gap' version_with_patchlevel_gap='4.12.2' type_gap='standard' source_gap='normal' trees_gap='SAGE_LOCAL' ``` The output is suitable as input for `eval` in Bourne shell. (The default output format is more human-friendly.) <!-- Why is this change required? What problem does it solve? --> Split out from: - sagemath#36740 where this new interface is used to eliminate direct references to `build/pkgs/` from various scripts and reduce code duplication and complexity in reading SPKG metadata. <!-- 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#37018 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
|
Documentation preview for this PR (built with commit b3be864; changes) is ready! 🎉 |
sagemathgh-37018: `sage --package properties` <!-- ^^^^^ 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 --> For example: ``` $ ./sage -package properties --format shell gap ecl git:sage_package_properties path_ecl='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/ecl' version_with_patchlevel_ecl='21.2.1' type_ecl='standard' source_ecl='normal' trees_ecl='SAGE_LOCAL' path_gap='/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/build/pkgs/gap' version_with_patchlevel_gap='4.12.2' type_gap='standard' source_gap='normal' trees_gap='SAGE_LOCAL' ``` The output is suitable as input for `eval` in Bourne shell. (The default output format is more human-friendly.) <!-- Why is this change required? What problem does it solve? --> Split out from: - sagemath#36740 where this new interface is used to eliminate direct references to `build/pkgs/` from various scripts and reduce code duplication and complexity in reading SPKG metadata. <!-- 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#37018 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
sagemathgh-37350: `sage -package dependencies` <!-- ^^^^^ 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 --> We add a new command `sage --package dependencies`. Like the command `sage --package properties` introduced in sagemath#37018, it can be used to eliminate direct references to `build/pkgs/` from various scripts and reduce code duplication in reading SPKG metadata. Here we only make such changes in `sage-spkg-info`. The only user-visible change is that the listed dependencies are now sorted alphabetically; this hides [subtle nuances that may be expressed in the sort order of some `dependencies` files](https://github.com/sagem ath/sage/pull/36878#issuecomment-1876426258). - Closes sagemath#33860 Split out from: - sagemath#36740 <!-- Why is this change required? What problem does it solve? --> <!-- 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#37350 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
sagemathgh-37430: Refactor `bootstrap`, `bootstrap-conda`, `m4/sage_spkg_collect.m4`, `sage-spkg-info` through `sage --package properties`, `sage-get-system-packages` <!-- ^^^^^ 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 --> Using the command `sage --package properties` added in sagemath#37018, we eliminate some direct references to `build/pkgs/` from various scripts and reduce code duplication in reading SPKG metadata. Using other `sage --package` commands, we also simplify the code for `bootstrap -s` and `bootstrap -D`. Review instructions: Note that there are changes to the `bootstrap`-generated file `m4/sage_spkg_configures.m4`: - The macro `SAGE_SPKG_COLLECT_INIT` is now called explicitly, with an argument (the full list of packages). - Lines such as `m4_define([SPKG_INSTALL_REQUIRES_exceptiongroup], [['exceptiongroup; python_version<\"3.11\"',]])dnl` are added for use by the macro `SAGE_PYTHON_PACKAGE_CHECK` (replacing direct access to `version_requirements.txt` files) <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> This is: - Split out from sagemath#36740 <!-- 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#37430 Reported by: Matthias Köppe Reviewer(s): Julian Rüth, Kwankyu Lee, Matthias Köppe, Tobias Diez
sagemathgh-37430: Refactor `bootstrap`, `bootstrap-conda`, `m4/sage_spkg_collect.m4`, `sage-spkg-info` through `sage --package properties`, `sage-get-system-packages` <!-- ^^^^^ 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 --> Using the command `sage --package properties` added in sagemath#37018, we eliminate some direct references to `build/pkgs/` from various scripts and reduce code duplication in reading SPKG metadata. Using other `sage --package` commands, we also simplify the code for `bootstrap -s` and `bootstrap -D`. Review instructions: Note that there are changes to the `bootstrap`-generated file `m4/sage_spkg_configures.m4`: - The macro `SAGE_SPKG_COLLECT_INIT` is now called explicitly, with an argument (the full list of packages). - Lines such as `m4_define([SPKG_INSTALL_REQUIRES_exceptiongroup], [['exceptiongroup; python_version<\"3.11\"',]])dnl` are added for use by the macro `SAGE_PYTHON_PACKAGE_CHECK` (replacing direct access to `version_requirements.txt` files) <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> This is: - Split out from sagemath#36740 <!-- 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#37430 Reported by: Matthias Köppe Reviewer(s): Julian Rüth, Kwankyu Lee, Matthias Köppe, Tobias Diez
For example:
The output is suitable as input for
evalin Bourne shell. (The default output format is more human-friendly.)Split out from:
bootstrap-conda,m4/sage_spkg_collect.m4through sage-package; handledependencies_build#36740where this new interface is used to eliminate direct references to
build/pkgs/from various scripts and reduce code duplication and complexity in reading SPKG metadata.📝 Checklist
⌛ Dependencies