File tree 2 files changed +17
-5
lines changed
2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ pages: rss
66
66
sphinx :
67
67
$(SPHINX_BUILD )
68
68
69
- fail_on_warning :
69
+ # for building Sphinx without a web-server
70
+ sphinx-local :
71
+ $(SPHINX_BUILD ) --build-files
72
+
73
+ fail-warning :
70
74
$(SPHINX_BUILD ) --fail-on-warning
71
75
72
- check_links :
76
+ check-links :
73
77
$(SPHINX_BUILD ) --check-links
Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ def create_parser():
10
10
parser = argparse .ArgumentParser (description = "Build PEP documents" )
11
11
# alternative builders:
12
12
parser .add_argument ("-l" , "--check-links" , action = "store_true" )
13
+ parser .add_argument ("-f" , "--build-files" , action = "store_true" )
14
+ parser .add_argument ("-d" , "--build-dirs" , action = "store_true" )
13
15
14
16
# flags / options
15
- parser .add_argument ("-f " , "--fail-on-warning" , action = "store_true" )
17
+ parser .add_argument ("-w " , "--fail-on-warning" , action = "store_true" )
16
18
parser .add_argument ("-n" , "--nitpicky" , action = "store_true" )
17
19
parser .add_argument ("-j" , "--jobs" , type = int , default = 1 )
18
20
@@ -31,9 +33,15 @@ def create_parser():
31
33
doctree_directory = build_directory / ".doctrees"
32
34
33
35
# builder configuration
34
- sphinx_builder = "dirhtml"
35
- if args .check_links :
36
+ if args .build_files :
37
+ sphinx_builder = "html"
38
+ elif args .build_dirs :
39
+ sphinx_builder = "dirhtml"
40
+ elif args .check_links :
36
41
sphinx_builder = "linkcheck"
42
+ else :
43
+ # default builder
44
+ sphinx_builder = "dirhtml"
37
45
38
46
# other configuration
39
47
config_overrides = {}
You can’t perform that action at this time.
0 commit comments