-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44756: in ./Doc, make build
depends on make html
#27403
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,28 +28,24 @@ install the tools into there. | |
Using make | ||
---------- | ||
|
||
To get started on UNIX, you can create a virtual environment with the command :: | ||
|
||
make venv | ||
|
||
That will install all the tools necessary to build the documentation. Assuming | ||
the virtual environment was created in the ``venv`` directory (the default; | ||
configurable with the VENVDIR variable), you can run the following command to | ||
build the HTML output files:: | ||
To get started on UNIX, you can create a virtual environment and build | ||
documentation with the command:: | ||
|
||
make html | ||
|
||
By default, if the virtual environment is not created, the Makefile will | ||
look for instances of sphinxbuild and blurb installed on your process PATH | ||
(configurable with the SPHINXBUILD and BLURB variables). | ||
The virtual environment in the ``venv`` directory will contain all the tools | ||
necessary to build the documentation. You can also configure where the virtual | ||
environment directory will be with the ``VENVDIR`` variable. | ||
|
||
On Windows, we try to emulate the Makefile as closely as possible with a | ||
``make.bat`` file. If you need to specify the Python interpreter to use, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not a Windows user, and I do not know if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
set the PYTHON environment variable instead. | ||
set the PYTHON environment variable. | ||
|
||
Available make targets are: | ||
|
||
* "clean", which removes all build files. | ||
* "clean", which removes all build files and the virtual environment. | ||
|
||
* "clean-venv", which removes the virtual environment directory. | ||
|
||
* "venv", which creates a virtual environment with all necessary tools | ||
installed. | ||
|
6 changes: 6 additions & 0 deletions
6
Misc/NEWS.d/next/Tools-Demos/2021-07-28-00-51-55.bpo-44756.pvAajB.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
In the Makefile for documentation (:file:`Doc/Makefile`), the ``build`` rule | ||
is dependent on the ``venv`` rule. Therefore, ``html``, ``latex``, and other | ||
build-dependent rules are also now dependent on ``venv``. The ``venv`` rule | ||
only performs an action if ``$(VENVDIR)`` does not exist. | ||
:file:`Doc/README.rst` was updated; most users now only need to type ``make | ||
html``. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note this change:
The reason for the change is that it simplifies the conditional action in the
venv
rule:However,
rm -rf
'ing an additional level higher is always worth a close review.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.
I note that you're no longer ignoring the exit code here. Since
-f
is used anyway, the likelihood of a non-zero exit code fromrm
is indeed low but it can still fail due to wrong permissions. Arguably, your current version is therefore better then.