bootstrap, src/doc/Makefile: Remove use of the SAGE_ROOT/sage script
mkoeppe opened this issue · 34 comments
We change the bootstrap scripts so that they invoke build/bin/sage-package directly instead of going through the SAGE_ROOT/sage script.
This is faster and also more robust because it separates build phases better by eliminating the (unnecessary) use of configure-generated files such as src/bin/sage-src-env-config.
We also move the generation of src/doc/en/reference/repl/options.txt (by calling sage -advanced) from bootstrap time to src/doc/Makefile. The information displayed there depends on what packages are installed, so running it at bootstrap time was not correct.
Depends on #33740
CC: @jhpalmieri @tobiasdiez @orlitzky @dimpase @kiwifb
Component: scripts
Author: Matthias Koeppe
Branch/Commit: 67c8238
Reviewer: John Palmieri, François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/33852
Last 10 new commits:
10338a7 | Change ci as well |
0cf7334 | Add sage-setup as install-requires dep |
6d2b149 | Use relative paths to not install src package |
1dba3ba | Maybe thats the correct shebang? |
c1b2fbf | Revert install_requires change |
ad56ba3 | Go back to two pip installs for now |
b42f5f5 | Readd how to use specific python version |
87f360c | Readd name arg |
765dff7 | Merge #33740 |
ccbc21a | bootstrap, bootstrap-conda, src/doc/bootstrap: Use build/bin/sage-package directly |
Branch pushed to git repo; I updated commit sha1. New commits:
4560895 | src/doc/Makefile: Remove explicit use of SAGE_ROOT and the top-level sage script |
Branch pushed to git repo; I updated commit sha1. New commits:
7759f3c | Generate en/reference/repl/options.txt at build time, not bootstrap time |
Description changed:
---
+++
@@ -2,3 +2,5 @@
This is faster and also more robust because it separates build phases better by eliminating the (unnecessary) use of `configure`-generated files such as `src/bin/sage-src-env-config`.
+We also move the generation of `src/doc/en/reference/repl/options.txt` (by calling `sage -advanced`) from bootstrap time to `src/doc/Makefile`. The information displayed there depends on what packages are installed, so running it at bootstrap time was not correct.
+Branch pushed to git repo; I updated commit sha1. New commits:
67c8238 | src/bin/sage: Print error to error output |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
facb1fc | build/bin/sage-spkg-info: Format dependencies |
Branch pushed to git repo; I updated commit sha1. New commits:
8ab0814 | build/pkgs/memory_allocator/SPKG.rst: Fix markup |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2d12c0b | build/pkgs/memory_allocator/SPKG.rst: Fix markup |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
I found it a bit hard to figure out what came from #33740 and what is this ticket :(
Once I get past that issue, I agree with the changes. It is much cleaner and simpler. May not go far enough from a sage-on-gentoo point of view (I will still patch but we had that discussion sage --docbuild vs python -m sage_docbuild somewhere else and that step is not ready yet). Just one remark, all the targets are phony in src/doc/Makefile by necessity but we could have had en/reference/repl/options.txt as a real target instead of a phony one, not that it matter much in that sea of stuff that rebuild every time you call make.
Replying to @kiwifb:
we could have had
en/reference/repl/options.txtas a real target instead of a phony one
Yes but what would be its dependencies?
Replying to @mkoeppe:
Replying to @kiwifb:
we could have had
en/reference/repl/options.txtas a real target instead of a phony oneYes but what would be its dependencies?
I am not sure I follow. It doesn't need to have dependencies or have I forgotten something fundamental about makefiles.
In that case it would never be updated, which can't be right
Replying to @mkoeppe:
In that case it would never be updated, which can't be right
Thank you for reminding me of some essentials :) I'd like to brush it off as it being too early in the morning to make a proper comment but I think that's just part of a pattern where I am too deep on the packager side, and thinking of workflow in which ultimately, makefile such as this one are "single use", and when something doesn't work you just restart from the top because you need the flow to be right. I am not spending enough time on the pure dev side, that's what
I think this looks okay, too. François, do you agree with a positive review?
Yes, let's get it in the next beta.
Reviewer: John Palmieri, François Bissey
Thanks!
Changed branch from u/mkoeppe/bootstrap__remove_use_of_the_sage_root_sage_script to 67c8238