Skip to content

Commit b9e0e45

Browse files
committed
Remove vulnerabilities.rst
* "make" should now build everything * Add requirements.txt: PyYAML * Add setup.py: run render_doc.py
1 parent d127acb commit b9e0e45

6 files changed

Lines changed: 46 additions & 1422 deletions

File tree

Makefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# Minimal makefile for Sphinx documentation
2-
#
3-
41
# You can set these variables from the command line.
52
SPHINXOPTS =
63
SPHINXBUILD = sphinx-build
74
SPHINXPROJ = PythonSecurity
85
SOURCEDIR = .
96
BUILDDIR = 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/

README.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
11
Python 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

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PyYAML

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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)

venv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ set -e -x
33
python3 -m venv --without-pip venv
44
wget https://bootstrap.pypa.io/get-pip.py
55
venv/bin/python get-pip.py
6-
venv/bin/python -m pip install -U PyYAML
6+
venv/bin/python -m pip install -r requirements.txt

0 commit comments

Comments
 (0)