Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d8d6b912
Kaydet (Commit)
d8d6b912
authored
Kas 26, 2017
tarafından
Caleb Hattingh
Kaydeden (comit)
Zachary Ware
Kas 26, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-30487: automatically create a venv and install Sphinx when running make (GH-4346)
üst
a6fba9b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
22 deletions
+31
-22
.travis.yml
.travis.yml
+1
-1
Makefile
Doc/Makefile
+7
-5
README.rst
Doc/README.rst
+23
-16
No files found.
.travis.yml
Dosyayı görüntüle @
d8d6b912
...
...
@@ -36,7 +36,7 @@ matrix:
# (Updating the version is fine as long as no warnings are raised by doing so.)
-
python -m pip install sphinx~=1.6.1 blurb
script
:
-
make check suspicious html SPHINXOPTS="-q -W -j4"
-
make check suspicious html SPHINX
BUILD="sphinx-build" SPHINX
OPTS="-q -W -j4"
-
os
:
linux
language
:
c
compiler
:
gcc
...
...
Doc/Makefile
Dosyayı görüntüle @
d8d6b912
...
...
@@ -17,7 +17,7 @@ ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PA
.PHONY
:
help build html htmlhelp latex text changes linkcheck
\
suspicious coverage doctest pydoc-topics htmlview clean dist check serve
\
autobuild-dev autobuild-stable
venv
autobuild-dev autobuild-stable
help
:
@
echo
"Please use
\`
make <target>' where <target> is one of"
...
...
@@ -39,7 +39,7 @@ help:
@
echo
" check to run a check for frequent markup errors"
@
echo
" serve to serve the documentation on the localhost (8000)"
build
:
build
:
venv
-
mkdir
-p
build
# Look first for a Misc/NEWS file (building from a source release tarball
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
...
...
@@ -122,9 +122,11 @@ clean:
-
rm
-rf
build/
*
$(VENVDIR)
/
*
venv
:
$(PYTHON)
-m
venv
$(VENVDIR)
$(VENVDIR)
/bin/python3
-m
pip
install
-U
Sphinx blurb
@
echo
"The venv has been created in the
$(VENVDIR)
directory"
@
if
[
"
$(SPHINXBUILD)
"
==
"PATH=
$(VENVDIR)
/bin:
$$
PATH sphinx-build"
]
;
then
\
$(PYTHON)
-m
venv
$(VENVDIR)
;
\
echo
"A virtual environment for Docs has been made in the
$(VENVDIR)
directory"
;
\
$(VENVDIR)
/bin/python3
-m
pip
install
Sphinx blurb
;
\
fi
dist
:
rm
-rf
dist
...
...
Doc/README.rst
Dosyayı görüntüle @
d8d6b912
...
...
@@ -21,21 +21,16 @@ tree but are maintained separately and are available from
* `Sphinx <https://pypi.org/project/Sphinx/>`_
* `blurb <https://pypi.org/project/blurb/>`_
The easiest way to install these tools is to create a virtual environment and
install the tools into there.
You could manually create a virtual environment and install them, but there is
a ``Makefile`` already set up to do this for you, as long as you have a working
Python 3 interpreter available.
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 ``env`` directory (the default;
configurable with the VENVDIR variable), you can run the following command to
build the HTML output files::
A Makefile has been prepared so that (on Unix), after you change into the
``Doc/`` directory you can simply run ::
make html
...
...
@@ -44,8 +39,17 @@ look for instances of sphinxbuild and blurb installed on your process PATH
(configurable with the SPHINXBUILD and BLURB variables).
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,
set the PYTHON environment variable instead.
``make.bat`` file.
To use a Python interpreter that's not called ``python3``, use the standard
way to set Makefile variables, using e.g. ::
make html PYTHON=python
On Windows, set the PYTHON environment variable instead.
To use a specific sphinx-build (something other than ``sphinx-build``), set
the SPHINXBUILD variable.
Available make targets are:
...
...
@@ -104,11 +108,14 @@ Available make targets are:
Without make
------------
First, install the tool dependencies from PyPI.
Then, from the ``Doc`` directory,
run ::
Install the Sphinx package and its dependencies from PyPI. In this situation,
you'll have to create a virtual environment manually, and install Sphinx into
it. Change into the ``Doc`` directory and
run ::
sphinx-build -b<builder> . build/<builder>
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install Sphinx
(venv) $ sphinx-build -b<builder> . build/<builder>
where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
see the make targets above).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment