66nox .options .reuse_existing_virtualenvs = True
77
88OUTPUT_DIR = "_build"
9- build_command = ["-b" , "html" , "." , "/" .join ([OUTPUT_DIR , "/html" ])]
9+ docs_dir = os .path .join ("_build" , "html" )
10+ build_command = ["-b" , "html" , "." , docs_dir ]
1011
1112@nox .session
1213def docs (session ):
@@ -25,12 +26,14 @@ def docs_live(session):
2526 "build_assets" ,
2627 "tmp" ,
2728 ]
29+
2830 # Explicitly include custom CSS in each build since
2931 # sphinx doesn't think _static files should change since,
3032 # well, they're static.
3133 # Include these as the final `filenames` argument
34+
3235 AUTOBUILD_INCLUDE = [
33- "_static/ pyos.css"
36+ os . path . join ( "_static" , " pyos.css")
3437 ]
3538
3639 # ----------------
@@ -39,19 +42,19 @@ def docs_live(session):
3942 for folder in AUTOBUILD_IGNORE :
4043 cmd .extend (["--ignore" , f"*/{ folder } /*" ])
4144
42- cmd .extend (build_command )
45+ #cmd.extend(build_command)
46+ cmd .extend (build_command + session .posargs )
4347
44- # use positional arguments if we have them
45- if len (session .posargs ) > 0 :
46- cmd .extend (session .posargs )
47- # otherwise use default output and include directory
48- else :
49- cmd .extend (AUTOBUILD_INCLUDE )
48+ # Use positional arguments if we have them
49+ # if len(session.posargs) > 0:
50+ # cmd.extend(session.posargs)
51+ # # Otherwise use default output and include directory
52+ # else:
53+ # cmd.extend(AUTOBUILD_INCLUDE)
5054
51- # ----------------
5255 session .run (* cmd )
5356
54- docs_dir = os . path . join ( "_build" , "html" )
57+
5558
5659@nox .session (name = "docs-clean" )
5760def clean_dir (dir_path = docs_dir ):
0 commit comments