forked from VUnit/vunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_docs.py
49 lines (41 loc) · 1.17 KB
/
build_docs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2020, Lars Asplund [email protected]
"""
Command line utility to build documentation/website
"""
from subprocess import check_call
from pathlib import Path
import sys
from sys import argv
from shutil import copyfile
from create_release_notes import create_release_notes
from docs_utils import examples, get_theme
DROOT = Path(__file__).parent.parent / 'docs'
def main():
"""
Build documentation/website
"""
create_release_notes()
examples()
copyfile(str(DROOT / '..' / 'LICENSE.rst'), str(DROOT / 'license.rst'))
get_theme(
DROOT,
"https://codeload.github.com/buildthedocs/sphinx.theme/tar.gz/v0"
)
check_call(
[
sys.executable,
"-m",
"sphinx"
] + ([] if len(argv) < 2 else argv[2:]) + [
"-TEWanb",
"html",
Path(__file__).parent.parent / "docs",
argv[1],
]
)
if __name__ == "__main__":
main()