Skip to content
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

Refactor bootstrap-conda, m4/sage_spkg_collect.m4 through sage-package; handle dependencies_build #36740

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Nov 20, 2023

Using new commands sage --package dependencies and sage --package properties, we eliminate direct references to build/pkgs/ from various scripts and reduce code duplication in reading SPKG metadata.

In particular, we simplify the configure-time compilation of dependency information for build/make/Makefile in m4/sage_spkg_collect.m4; this also gives a bit of a speedup when running ./configure.

We complement the build/make/Makefile variables deps_SPKG by new variables build_deps_SPKG and check_deps_SPKG. This is refactoring only; there should be no change in behavior (also note that no dependencies_build file is added here.) Together with #36738, this is also preparation for improving the parallelization of build phases of various packages. As it gives us a clearer mapping of "build-system requires" and "install requires" of Python packages, it is also preparation for automating more steps of the creation of Python SPKGs (sage -package create --pypi).

Review instructions:

  • There is a change 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)
  • To view the effective Makefile rules after macroexpansion, use make DEBUG_RULES=1 . (Note there is no change to the macro for script packages here; these rules will be merged into the macro for normal packages as a follow-up to build/bin/sage-spkg: Add support for installing script packages #36747._

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe self-assigned this Nov 20, 2023
@mkoeppe mkoeppe force-pushed the dependencies_build branch 2 times, most recently from 9504420 to 6173224 Compare November 22, 2023 21:36
@mkoeppe mkoeppe requested a review from dimpase December 7, 2023 20:55
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 9, 2023
…eaning separately from build/install

    
<!-- ^^^^^
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 -->
The `sage-spkg` script installs normal and wheel packages.
We create new options that make it possible to invoke the phases of the
installation separately.
```
   -d: only download the package
   -b: build and install (stage) only, do not run post-install
       or check
   -p: post-install only
   -x: exclusively run the test suite; this may assume that:
        * the package has been installed already and/or that
        * the temporary build directory has not been deleted
   -e: erase (delete) the temporary build directory only
```
This is preparation for improvements in `Makefile.in` in combination
with 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.
- [ ] 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#36738
Reported by: Matthias Köppe
Reviewer(s): Michael Orlitzky
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 9, 2023
… to the post-install phase

    
<!-- ^^^^^
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 -->

Previously, on `sdh_pip_install`, the wheel file is staged in DESTDIR,
but the wheel is installed immediately.
Now we store a new script `spkg-pipinst`, which is run after unloading
DESTDIR (and before any `spkg-postinst` script), which does the actual
installation of the wheel.

- This resolves sagemath#30956 (fixing the wheel URLs shown in `sage -pip
freeze`) -- except when `SAGE_SUDO` is set.

Apart from this and some changes to the messages displayed during
package installation, this should make no difference for any of our
packages.

Just so that it is tested for at least one package in CI, we include a
small package update.

Together with
- sagemath#36738 and
- sagemath#36740,

this is preparation for requiring only the build dependencies ("build-
system requires") while building a wheel for the package, and to require
the runtime dependencies ("install-requires") only later, when the wheel
is to be installed.

<!-- 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#36743
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 13, 2023
…cript 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 -->
Split out and updated from sagemath#29386.

The section of `build/make/Makefile.in` that deals with script packages
can be consolidated with the section on normal packages later, in a
follow-up PR after sagemath#36740, sagemath#36738.

We switch the `spkg-install` scripts of the `sage*` script packages to
the templated versions (`spkg-install.in`), which is a simplification.
`spkg-check` remains as is because we still invoke it directly (changing
this will need sagemath#36738).

Resolves sagemath#29386.

<!-- 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: ...
-->
- Depends on sagemath#36737 (for testing)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36747
Reported by: Matthias Köppe
Reviewer(s): Michael Orlitzky
@mkoeppe mkoeppe changed the title build/pkgs/*/dependencies_build Refactor bootstrap, bootstrap-conda, m4/sage_spkg_collect.m4 through sage-package; handle dependencies_build Dec 16, 2023
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 16, 2023

@dimpase @orlitzky Please review

@tornaria tornaria removed their request for review December 31, 2023 13:28
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 13, 2024
…sions of the Sage distribution

    
<!-- ^^^^^
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 -->

Discussions of the complexity of the Sage distribution pop up
unexpectedly, as seen in

sagemath#36982 (comment),
sagemath#36982 (comment),
sagemath#36982 (comment),
sagemath#36982 (comment),
sagemath#36982 (comment),
sagemath#36982 (comment),
sagemath#36982 (comment)

sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment),
sagemath#36726 (comment)

sagemath#36777 (comment),
sagemath#36777 (comment),
sagemath#36777 (comment),
sagemath#36777 (comment),
sagemath#36777 (comment),
sagemath#36777 (comment)

To help put such discussions on a solid factual basis, we introduce the
command `sage --package metrics`.

```
$ ./sage -package metrics :standard:
has_file_distros_arch_txt=131
has_file_distros_conda_txt=216
has_file_distros_debian_txt=125
has_file_distros_fedora_txt=138
has_file_distros_gentoo_txt=181
has_file_distros_homebrew_txt=61
has_file_distros_macports_txt=129
has_file_distros_nix_txt=51
has_file_distros_opensuse_txt=146
has_file_distros_slackware_txt=25
has_file_distros_void_txt=184
has_file_patches=35
has_file_spkg_check=59
has_file_spkg_configure_m4=222
has_file_spkg_install=198
has_tarball_upstream_url=231
line_count_file_patches=22561
line_count_file_spkg_check=402
line_count_file_spkg_configure_m4=2792
line_count_file_spkg_install=2960
packages=272
type_standard=272
```

Use `PATH=build/bin:$PATH SAGE_ROOT=some-other-worktree build/bin/sage-
package metrics :standard:` to obtain the metrics of another version of
Sage in some other worktree.

We add computation and before/after comparison of the metrics to the CI
Linux Incremental workflow.
As an illustration, we change one Python package from "normal" to
"wheel", removing an `spkg-install.in` file in the process. See https://
github.com/sagemath/sage/actions/runs/7342841283/job/19992606617?pr=3697
7#step:6:12

More metrics can be added after
- 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.
- [ ] 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#36977
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 16, 2024
    
<!-- ^^^^^
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 16, 2024
    
<!-- ^^^^^
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 16, 2024
    
<!-- ^^^^^
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 21, 2024
    
<!-- ^^^^^
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
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 13, 2024

@dimpase please apply sense of duty here

@mkoeppe mkoeppe force-pushed the dependencies_build branch 3 times, most recently from e36eddd to 41403cc Compare June 12, 2024 21:08
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 16, 2024
…pkg_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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 17, 2024
…pkg_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
@mkoeppe mkoeppe changed the title Refactor bootstrap, bootstrap-conda, m4/sage_spkg_collect.m4 through sage-package; handle dependencies_build Refactor bootstrap-conda, m4/sage_spkg_collect.m4 through sage-package; handle dependencies_build Jun 22, 2024
@mkoeppe mkoeppe force-pushed the dependencies_build branch 2 times, most recently from a4137cd to f2b8011 Compare July 25, 2024 10:49
Matthias Koeppe added 8 commits October 19, 2024 11:48
…Makefile variables build_deps_...

m4/sage_spkg_collect.m4: Change handling of 'dependencies_check' files, generate Makefile variables check_deps_...

build/make/Makefile.in: Handle build_deps, deps, check_deps separately in package templates

m4/sage_spkg_collect.m4, build/make/Makefile.in: Simplify handling of optional deps

bootstrap, m4/sage_spkg_collect.m4: Get dependencies via 'sage --package dependencies --format=shell'

m4/sage_spkg_collect.m4: Handle wheel packages like normal packages
bootstrap: Remove last direct use of 'build/pkgs'

bootstrap-conda: Use 'sage-package properties' and 'sage-package dependencies'

Update shell uses of 'sage-package properties'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant