44# http://creativecommons.org/licenses/by-sa/3.0.
55
66import shutil
7- import nox
87
8+ import nox
99
1010nox .options .sessions = []
1111
@@ -20,7 +20,7 @@ def translation(session):
2020 session .run (
2121 "sphinx-build" ,
2222 "-b" , "gettext" , # build gettext-style message catalogs (.pot file)
23- "-d" , ".nox/ .doctrees/ " , # path to put the cache
23+ "-d" , session . cache_dir / " .doctrees" , # path to put the cache
2424 "source/" , # where the rst files are located
2525 target_dir , # where to put the .pot file
2626 )
@@ -52,6 +52,7 @@ def build(session, autobuild=False):
5252 command , * extra_args ,
5353 "-j" , "auto" , # parallelize the build
5454 "-b" , "html" , # use HTML builder
55+ "-d" , session .cache_dir / ".doctrees" , # path to put the cache
5556 "-n" , # nitpicky warn about all missing references
5657 "-W" , # Treat warnings as errors.
5758 * session .posargs ,
@@ -78,6 +79,7 @@ def linkcheck(session):
7879 session .run (
7980 "sphinx-build" ,
8081 "-b" , "linkcheck" , # use linkcheck builder
82+ "-d" , session .cache_dir / ".doctrees" , # path to put the cache
8183 "--color" ,
8284 "-n" , "-W" , "--keep-going" , # be strict
8385 "source" , # where the rst files are located
0 commit comments