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

Docs: make htmllive: open browser when ready #113288

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 19, 2023

Like python/peps#3558 and python/devguide#1233.

When running make -C Docs htmllive, this will open the browser when the docs have been built the first time.

It means you don't need to hunt around for the link in:

make -C Doc htmllive
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
./venv/bin/sphinx-autobuild -b html -d build/doctrees -j auto  --re-ignore="/venv/" --open-browser --delay 0 -W . build/html
[sphinx-autobuild] > sphinx-build -b html -d build/doctrees -j auto -W /Users/hugo/github/python/cpython/main/Doc /Users/hugo/github/python/cpython/main/Doc/build/html
Running Sphinx v6.2.1
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 463 source files that are out of date
updating environment: 0 added, 4 changed, 0 removed
reading sources... [100%] whatsnew/changelog
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] whatsnew/2.2 .. whatsnew/index
generating indices... genindex py-modindex done
writing additional pages... download index search opensearch done
copying images... [100%] using/win_installer.png
copying downloadable files... [100%] includes/tzinfo_examples.py
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
Writing glossary.json
build succeeded.

The HTML pages are in build/html.
[I 231219 15:20:27 server:335] Serving on http://127.0.0.1:8000
[I 231219 15:20:27 handlers:62] Start watching changes
[I 231219 15:20:27 handlers:64] Start detecting changes
[I 231219 15:20:28 handlers:135] Browser Connected: http://127.0.0.1:8000/

Also make ALLSPHINXOPTS multiline to match https://github.com/python/devguide/blob/78fc0d7aa9fd0d6733d10c23b178b2a0e2799afc/Makefile#L18-L23 and https://github.com/python/peps/blob/9779c7efe63ab8dbb8bb673c5346c35505d97065/Makefile#L14-L17 to make it much easier to compare and maintain them.


📚 Documentation preview 📚: https://cpython-previews--113288.org.readthedocs.build/

@hugovk hugovk added docs Documentation in the Doc dir needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Dec 19, 2023
@hugovk hugovk merged commit 36adc79 into python:main Dec 26, 2023
30 checks passed
@hugovk hugovk deleted the docs-make-htmllive-open-browser branch December 26, 2023 12:02
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 26, 2023

GH-113484 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 26, 2023
(cherry picked from commit 36adc79)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 26, 2023
@bedevere-app
Copy link

bedevere-app bot commented Dec 26, 2023

GH-113485 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 26, 2023
(cherry picked from commit 36adc79)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 26, 2023
hugovk added a commit that referenced this pull request Dec 26, 2023
)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Dec 26, 2023
)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant