summaryrefslogtreecommitdiff
path: root/subplot.py
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:23:22 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:23:31 +0000
commit437a2c87e85de43911eb04f721e0af9f3c67f4cf (patch)
treec8a7b498771a5c3d854dcebcf4b849e071a393ca /subplot.py
parent5492481a98fe02cbd532d5e32e8d192109daa0b9 (diff)
downloadsubplot-437a2c87e85de43911eb04f721e0af9f3c67f4cf.tar.gz
check: Cope with non-embedded resources by passing --resources to docgen
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplot.py')
-rw-r--r--subplot.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/subplot.py b/subplot.py
index dbfb309..7d9544b 100644
--- a/subplot.py
+++ b/subplot.py
@@ -12,7 +12,7 @@ import tempfile
wrapper = """\
#!/bin/sh
set -eu
-exec '{srcdir}/target/debug/sp-codegen' "$@" --resources '{srcdir}/share'
+exec '{srcdir}/target/debug/{prog}' "$@" --resources '{srcdir}/share'
"""
@@ -23,10 +23,11 @@ def install_subplot(ctx):
# Create a "bin" directory for the wrapper. Can't put this into datadir, as
# some of Subplot's scenarios make assumptions on what files exist there.
bindir = ctx["bin-dir"] = tempfile.mkdtemp()
- filename = os.path.join(bindir, "sp-codegen")
- with open(filename, "w") as f:
- f.write(wrapper.format(srcdir=srcdir))
- os.chmod(filename, 0o755)
+ for prog in ["sp-codegen", "sp-docgen"]:
+ filename = os.path.join(bindir, prog)
+ with open(filename, "w") as f:
+ f.write(wrapper.format(prog=prog, srcdir=srcdir))
+ os.chmod(filename, 0o755)
# Add the temporary bin directory to the path, and then the source
# directory's Rust binary target directory.