File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ pages: rss
6666sphinx :
6767 $(SPHINX_BUILD )
6868
69- fail_on_warning :
69+ # for building Sphinx without a web-server
70+ sphinx-local :
71+ $(SPHINX_BUILD ) --build-files
72+
73+ fail-warning :
7074 $(SPHINX_BUILD ) --fail-on-warning
7175
72- check_links :
76+ check-links :
7377 $(SPHINX_BUILD ) --check-links
Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ def create_parser():
1010 parser = argparse .ArgumentParser (description = "Build PEP documents" )
1111 # alternative builders:
1212 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" )
1315
1416 # flags / options
15- parser .add_argument ("-f " , "--fail-on-warning" , action = "store_true" )
17+ parser .add_argument ("-w " , "--fail-on-warning" , action = "store_true" )
1618 parser .add_argument ("-n" , "--nitpicky" , action = "store_true" )
1719 parser .add_argument ("-j" , "--jobs" , type = int , default = 1 )
1820
@@ -31,9 +33,15 @@ def create_parser():
3133 doctree_directory = build_directory / ".doctrees"
3234
3335 # 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 :
3641 sphinx_builder = "linkcheck"
42+ else :
43+ # default builder
44+ sphinx_builder = "dirhtml"
3745
3846 # other configuration
3947 config_overrides = {}
You can’t perform that action at this time.
0 commit comments