6
6
nox .options .reuse_existing_virtualenvs = True
7
7
8
8
OUTPUT_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 ]
10
11
11
12
@nox .session
12
13
def docs (session ):
@@ -25,12 +26,14 @@ def docs_live(session):
25
26
"build_assets" ,
26
27
"tmp" ,
27
28
]
29
+
28
30
# Explicitly include custom CSS in each build since
29
31
# sphinx doesn't think _static files should change since,
30
32
# well, they're static.
31
33
# Include these as the final `filenames` argument
34
+
32
35
AUTOBUILD_INCLUDE = [
33
- "_static/ pyos.css"
36
+ os . path . join ( "_static" , " pyos.css")
34
37
]
35
38
36
39
# ----------------
@@ -39,19 +42,19 @@ def docs_live(session):
39
42
for folder in AUTOBUILD_IGNORE :
40
43
cmd .extend (["--ignore" , f"*/{ folder } /*" ])
41
44
42
- cmd .extend (build_command )
45
+ #cmd.extend(build_command)
46
+ cmd .extend (build_command + session .posargs )
43
47
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)
50
54
51
- # ----------------
52
55
session .run (* cmd )
53
56
54
- docs_dir = os . path . join ( "_build" , "html" )
57
+
55
58
56
59
@nox .session (name = "docs-clean" )
57
60
def clean_dir (dir_path = docs_dir ):
0 commit comments