From 07b4bc8a8ebe8dd616af181b9c79c9c03be33206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 29 May 2024 20:58:00 +0200 Subject: [PATCH 1/2] FIX make sphinx docs work under Windows --- spin/cmds/meson.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spin/cmds/meson.py b/spin/cmds/meson.py index 95e3e86..c3c3dc2 100644 --- a/spin/cmds/meson.py +++ b/spin/cmds/meson.py @@ -857,7 +857,9 @@ def docs( bold=True, fg="bright_blue", ) - _run(["make", "-C", doc_dir, sphinx_target], replace=True) + + make_cmd = "make.bat" if sys.platform == "win32" else "make" + _run([make_cmd, sphinx_target], cwd=doc_dir, replace=True) @click.command() From 75376cfae200d369dae3fbcd80d98d12697830e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 30 May 2024 08:00:11 +0200 Subject: [PATCH 2/2] Tweak --- spin/cmds/meson.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spin/cmds/meson.py b/spin/cmds/meson.py index c3c3dc2..bfa0356 100644 --- a/spin/cmds/meson.py +++ b/spin/cmds/meson.py @@ -858,7 +858,8 @@ def docs( fg="bright_blue", ) - make_cmd = "make.bat" if sys.platform == "win32" else "make" + make_bat_exists = (Path(doc_dir) / "make.bat").exists() + make_cmd = "make.bat" if sys.platform == "win32" and make_bat_exists else "make" _run([make_cmd, sphinx_target], cwd=doc_dir, replace=True)