Skip to content

bpo-35249: Updated Makefile to add quick building option #10547

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

Closed
wants to merge 1 commit into from

Conversation

Seluj78
Copy link
Contributor

@Seluj78 Seluj78 commented Nov 14, 2018

When working on the Documentation or when translating it, I often have to rebuild the doc locally to see the changes I made and see how it looks.

However, with the current configuration, It takes (on my computer at least) more than 4 minutes to build.

After investigating, I've found out that the build options on the Makefile of python-docs-fr and of cpython/Docs both have the E and a options set, which forces a complete rebuild, even when running locally.

cpython/Doc/Makefile

Lines 178 to 208 in 9ee1d42

# Targets for daily automated doc build
# By default, Sphinx only rebuilds pages where the page content has changed.
# This means it doesn't always pick up changes to preferred link targets, etc
# To ensure such changes are picked up, we build the published docs with
# `-E` (to ignore the cached environment) and `-a` (to ignore already existing
# output files)
# for development releases: always build
autobuild-dev:
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A switchers=1'
-make suspicious
# for quick rebuilds (HTML only)
autobuild-dev-html:
make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A switchers=1'
# for stable releases: only build if not in pre-release stage (alpha, beta)
# release candidate downloads are okay, since the stable tree can be in that stage
autobuild-stable:
@case $(DISTVERSION) in *[ab]*) \
echo "Not building; $(DISTVERSION) is not a release version."; \
exit 1;; \
esac
@make autobuild-dev
autobuild-stable-html:
@case $(DISTVERSION) in *[ab]*) \
echo "Not building; $(DISTVERSION) is not a release version."; \
exit 1;; \
esac
@make autobuild-dev-html

python/python-docs-fr@af8c7a9

My proposal is to add a make dev in the python-docs-fr Makefile and add in cpython/Docs a mode which will only recompile the needed files.

https://bugs.python.org/issue35249

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@Seluj78 Seluj78 changed the title Updated Makefile to add quick building option bpo-35249: Updated Makefile to add quick building option Nov 14, 2018
@JulienPalard
Copy link
Member

JulienPalard commented Nov 14, 2018

Isn't a make html enough for this task?

A make html takes 11s on the 2nd run on my machine.

@Seluj78
Copy link
Contributor Author

Seluj78 commented Nov 14, 2018

@Seluj78 Seluj78 closed this Nov 14, 2018
@Seluj78 Seluj78 deleted the patch-1 branch November 14, 2018 20:46
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.

4 participants