3
3
# Attribution-ShareAlike license:
4
4
# http://creativecommons.org/licenses/by-sa/3.0.
5
5
6
- import shutil
7
6
8
7
import nox
9
8
@@ -19,10 +18,12 @@ def translation(session):
19
18
target_dir = "locales"
20
19
session .run (
21
20
"sphinx-build" ,
22
- "-b" , "gettext" , # build gettext-style message catalogs (.pot file)
23
- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
21
+ "-b" ,
22
+ "gettext" , # build gettext-style message catalogs (.pot file)
23
+ "-d" ,
24
+ session .cache_dir / ".doctrees" , # path to put the cache
24
25
"source/" , # where the rst files are located
25
- target_dir , # where to put the .pot file
26
+ target_dir , # where to put the .pot file
26
27
)
27
28
28
29
@@ -45,10 +46,14 @@ def build(session, autobuild=False):
45
46
)
46
47
47
48
session .run (
48
- command , * extra_args ,
49
- "-j" , "auto" , # parallelize the build
50
- "-b" , "html" , # use HTML builder
51
- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
49
+ command ,
50
+ * extra_args ,
51
+ "-j" ,
52
+ "auto" , # parallelize the build
53
+ "-b" ,
54
+ "html" , # use HTML builder
55
+ "-d" ,
56
+ session .cache_dir / ".doctrees" , # path to put the cache
52
57
"-n" , # nitpicky warn about all missing references
53
58
"-W" , # Treat warnings as errors.
54
59
* session .posargs ,
@@ -74,12 +79,16 @@ def linkcheck(session):
74
79
session .install ("-r" , "requirements.txt" )
75
80
session .run (
76
81
"sphinx-build" ,
77
- "-b" , "linkcheck" , # use linkcheck builder
78
- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
82
+ "-b" ,
83
+ "linkcheck" , # use linkcheck builder
84
+ "-d" ,
85
+ session .cache_dir / ".doctrees" , # path to put the cache
79
86
"--color" ,
80
- "-n" , "-W" , "--keep-going" , # be strict
81
- "source" , # where the rst files are located
82
- "build" , # where to put the check output
87
+ "-n" ,
88
+ "-W" ,
89
+ "--keep-going" , # be strict
90
+ "source" , # where the rst files are located
91
+ "build" , # where to put the check output
83
92
)
84
93
85
94
0 commit comments