Skip to content

Commit b9b6a74

Browse files
committed
Fix doc hardcoded
See #178 – I'm unsure and was not able to test.
1 parent 1db0378 commit b9b6a74

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spin/cmds/meson.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -632,15 +632,15 @@ def docs(ctx, sphinx_target, clean, first_build, jobs, sphinx_gallery_plot):
632632

633633
if clean:
634634
doc_dirs = [
635-
"./doc/build/",
636-
"./doc/source/api/",
637-
"./doc/source/auto_examples/",
638-
"./doc/source/jupyterlite_contents/",
635+
f"./{doc_dir}/build/",
636+
f"./{doc_dir}/source/api/",
637+
f"./{doc_dir}/source/auto_examples/",
638+
f"./{doc_dir}/source/jupyterlite_contents/",
639639
]
640-
for doc_dir in doc_dirs:
641-
if os.path.isdir(doc_dir):
642-
print(f"Removing {doc_dir!r}")
643-
shutil.rmtree(doc_dir)
640+
for target_dir in doc_dirs:
641+
if os.path.isdir(target_dir):
642+
print(f"Removing {target_dir!r}")
643+
shutil.rmtree(target_dir)
644644

645645
build_cmd = _get_configured_command("build")
646646

@@ -670,7 +670,7 @@ def docs(ctx, sphinx_target, clean, first_build, jobs, sphinx_gallery_plot):
670670
click.secho(
671671
f"$ export PYTHONPATH={os.environ['PYTHONPATH']}", bold=True, fg="bright_blue"
672672
)
673-
_run(["make", "-C", "doc", sphinx_target], replace=True)
673+
_run(["make", "-C", doc_dir, sphinx_target], replace=True)
674674

675675

676676
@click.command()

0 commit comments

Comments
 (0)