aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/tools
diff options
context:
space:
mode:
authorGravatar Jim Fehrle <jfehrle@sbcglobal.net>2018-06-14 17:56:22 -0700
committerGravatar Jim Fehrle <jfehrle@sbcglobal.net>2018-06-20 07:59:22 -0700
commit5808915bcb5f9800727cc10e5232c8983e1842bd (patch)
tree41331845e44a41a208933d5067b312cbdadf835c /doc/tools
parentf2e2d1d9f00ab731bd2bbe1dd57d685ac5024204 (diff)
On cygwin, pass the filename in a format that coqdoc understands.
Diffstat (limited to 'doc/tools')
-rw-r--r--doc/tools/coqrst/coqdoc/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/tools/coqrst/coqdoc/main.py b/doc/tools/coqrst/coqdoc/main.py
index cedd60d3b..57adcb287 100644
--- a/doc/tools/coqrst/coqdoc/main.py
+++ b/doc/tools/coqrst/coqdoc/main.py
@@ -20,6 +20,7 @@ lexer.
"""
import os
+import platform
from tempfile import mkstemp
from subprocess import check_output
@@ -36,6 +37,9 @@ def coqdoc(coq_code, coqdoc_bin=None):
"""Get the output of coqdoc on coq_code."""
coqdoc_bin = coqdoc_bin or os.path.join(os.getenv("COQBIN"), "coqdoc")
fd, filename = mkstemp(prefix="coqdoc-", suffix=".v")
+ if platform.system().startswith("CYGWIN"):
+ # coqdoc currently doesn't accept cygwin style paths in the form "/cygdrive/c/..."
+ filename = check_output(["cygpath", "-w", filename]).decode("utf-8").strip()
try:
os.write(fd, COQDOC_HEADER.encode("utf-8"))
os.write(fd, coq_code.encode("utf-8"))