-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Use "modern" Makefile template #1370
Conversation
Before, in classic Now, it always runs it. Can we maintain the original behaviour? |
In my local testing, it always re-generated, because I'm out at the moment but will have a look when I get back. A |
This is the current behaviour on my computer (adding a "date" command into the .../devguide$ make html
venv already exists.
To recreate it, remove it first with `make clean-venv'.
date "+%Y-%m-%d %H:%M:%S"
2024-08-14 17:54:08
Release cycle data generated.
./venv/bin/sphinx-build --builder html --doctree-dir _build/doctrees --jobs auto --fail-on-warning --keep-going . _build/html
[snip]
.../devguide$ make html
venv already exists.
To recreate it, remove it first with `make clean-venv'.
date "+%Y-%m-%d %H:%M:%S"
2024-08-14 17:54:39
Release cycle data generated.
./venv/bin/sphinx-build --builder html --doctree-dir _build/doctrees --jobs auto --fail-on-warning --keep-going . _build/html
[snip] A |
I haven't worked out how to construct a pattern rule that looks for an naked name (no suffix, no directory), so this hopefully serves as a work-around. Feel free to test on a proper UNIX system! A |
On
|
On the PRAdding the ❯ touch include/branches.csv include/end-of-life.csv include/release-cycle.svg
❯ touch include/release-cycle.json
❯ make html
./venv/bin/python3 _tools/generate_release_cycle.py
hello
Release cycle data generated.
./venv/bin/sphinx-build -M html "." "_build" --jobs auto --fail-on-warning --keep-going -q
matplotlib is not installed, social cards will not be generated
❯ make html
./venv/bin/sphinx-build -M html "." "_build" --jobs auto --fail-on-warning --keep-going -q
matplotlib is not installed, social cards will not be generated Will review a bit closer :) |
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.
On main
, we get:
❯ make html
venv already exists.
To recreate it, remove it first with `make clean-venv'.
Release cycle data generated.
./venv/bin/sphinx-build --builder html --doctree-dir _build/doctrees --jobs auto --fail-on-warning --keep-going . _build/html
Running Sphinx v8.0.2
loading translations [en]... done
matplotlib is not installed, social cards will not be generated
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
reading sources...
looking for now-outdated files... none found
no targets are out of date.
Writing redirects...
build succeeded.
The HTML pages are in _build/html.
On the PR we get:
❯ make html
./venv/bin/sphinx-build -M html "." "_build" --jobs auto --fail-on-warning --keep-going -q
matplotlib is not installed, social cards will not be generated
Comparing the called commands, rearranging and adding spaces to aid comparison:
-./venv/bin/sphinx-build --builder html --doctree-dir _build/doctrees --jobs auto --fail-on-warning --keep-going . _build/html
+./venv/bin/sphinx-build -M html --jobs auto --fail-on-warning --keep-going "." "_build" -q
So that removed --doctree-dir _build/doctrees
is fine because it's the default.
The output dir change from _build/html
to _build
doesn't seem to matter, the output files are in _build/html
anyway.
What's -M
? It seems to be --builder
but the help says the short option is -b
.
It also adds -q
aka --quiet
: "no output on stdout, just warnings on stderr".
Do we want to suppress the output? Is there a way to permanently suppress that -q
, or temporarily do so for a single run?
Sphinx's make mode -- fully replicating the old-style (e.g. here)
This was unintended, sorry (accidental commit of local tests). |
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.
Nice cleanup, thanks!
I've not reviewed make.bat
or make.ps1
.
Sphinx added this format in 2014. Nevertheless, it is the "modern" format, and far less verbose in the Makefile.
A
📚 Documentation preview 📚: https://cpython-devguide--1370.org.readthedocs.build/