File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Minimal makefile for Sphinx documentation
2- #
3-
41# You can set these variables from the command line.
52SPHINXOPTS =
63SPHINXBUILD = sphinx-build
74SPHINXPROJ = PythonSecurity
85SOURCEDIR = .
96BUILDDIR = build
107
11- all :
12- ./venv/bin/python render_doc.py
8+ .PHONY : html
9+
10+ doc : html
1311 make html
1412
15- # Put it first so that "make" without argument is like "make help".
16- help :
17- @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
13+ venv :
14+ ./venv.sh
1815
19- .PHONY : help Makefile
16+ vulnerabilities.rst : vulnerabilities.yml venv
17+ ./venv/bin/python render_doc.py
2018
21- # Catch-all target: route all unknown targets to Sphinx using the new
22- # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
23- % : Makefile
19+ html : vulnerabilities.rst
2420 @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
21+
22+ clean :
23+ rm -rf vulnerabilities.rst build/ venv/
Original file line number Diff line number Diff line change 11Python Security documentation: http://python-security.readthedocs.io/
2+
3+ Input files:
4+
5+ * ``vulnerabilities.yml ``: Python vulnerabilities 2007-2017, see the commented
6+ template at the end to add a new entry
7+ * ``python_releases.txt ``: Python release dates 2.5.0-3.6.0
8+
9+ Cache files:
10+
11+ * ``commit_dates.txt ``
12+ * ``commit_tags.txt ``
13+
14+ Build the doc::
15+
16+ make
17+
18+ Build without Makefile::
19+
20+ ./venv.sh
21+ ./venv/bin/python render_doc.py
22+ sphinx-build -M html . build
23+
24+ For ReadTheDocs.org, other files are used:
25+
26+ * ``requirements.txt ``
27+ * ``setup.py ``: run render_doc.py
Original file line number Diff line number Diff line change 1+ PyYAML
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ import os , subprocess , sys
3+ script = 'render_doc.py'
4+ # render_doc.py
5+ print ("Run %s" % script )
6+ args = [sys .executable , script ]
7+ os .execv (args [0 ], args )
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ set -e -x
33python3 -m venv --without-pip venv
44wget https://bootstrap.pypa.io/get-pip.py
55venv/bin/python get-pip.py
6- venv/bin/python -m pip install -U PyYAML
6+ venv/bin/python -m pip install -r requirements.txt
You can’t perform that action at this time.
0 commit comments