Skip to content

Commit bb9d515

Browse files
committed
Revert "bpo-44756: in ./Doc, make build depends on make html (python#27403)"
This reverts commit d22c876.
1 parent ac811f9 commit bb9d515

3 files changed

Lines changed: 20 additions & 29 deletions

File tree

Doc/Makefile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ help:
4545
@echo " check to run a check for frequent markup errors"
4646
@echo " serve to serve the documentation on the localhost (8000)"
4747

48-
build: venv
48+
build:
4949
-mkdir -p build
5050
# Look first for a Misc/NEWS file (building from a source release tarball
5151
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
@@ -137,21 +137,14 @@ pydoc-topics: build
137137
htmlview: html
138138
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
139139

140-
clean: clean-venv
141-
-rm -rf build/*
142-
143-
clean-venv:
144-
rm -rf $(VENVDIR)
140+
clean:
141+
-rm -rf build/* $(VENVDIR)/*
145142

146143
venv:
147-
@if [ -d $(VENVDIR) ] ; then \
148-
echo "venv already exists"; \
149-
else \
150-
$(PYTHON) -m venv $(VENVDIR); \
151-
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools; \
152-
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt; \
153-
echo "The venv has been created in the $(VENVDIR) directory"; \
154-
fi
144+
$(PYTHON) -m venv $(VENVDIR)
145+
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools
146+
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt
147+
@echo "The venv has been created in the $(VENVDIR) directory"
155148

156149
dist:
157150
rm -rf dist

Doc/README.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,28 @@ install the tools into there.
2828
Using make
2929
----------
3030

31-
To get started on UNIX, you can create a virtual environment and build
32-
documentation with the command::
31+
To get started on UNIX, you can create a virtual environment with the command ::
32+
33+
make venv
34+
35+
That will install all the tools necessary to build the documentation. Assuming
36+
the virtual environment was created in the ``venv`` directory (the default;
37+
configurable with the VENVDIR variable), you can run the following command to
38+
build the HTML output files::
3339

3440
make html
3541

36-
The virtual environment in the ``venv`` directory will contain all the tools
37-
necessary to build the documentation. You can also configure where the virtual
38-
environment directory will be with the ``VENVDIR`` variable.
42+
By default, if the virtual environment is not created, the Makefile will
43+
look for instances of sphinxbuild and blurb installed on your process PATH
44+
(configurable with the SPHINXBUILD and BLURB variables).
3945

4046
On Windows, we try to emulate the Makefile as closely as possible with a
4147
``make.bat`` file. If you need to specify the Python interpreter to use,
42-
set the PYTHON environment variable.
48+
set the PYTHON environment variable instead.
4349

4450
Available make targets are:
4551

46-
* "clean", which removes all build files and the virtual environment.
47-
48-
* "clean-venv", which removes the virtual environment directory.
52+
* "clean", which removes all build files.
4953

5054
* "venv", which creates a virtual environment with all necessary tools
5155
installed.

Misc/NEWS.d/next/Tools-Demos/2021-07-28-00-51-55.bpo-44756.pvAajB.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)