Skip to content

Commit

Permalink
artiq_flash: fix openocd scripts path (#513)
Browse files Browse the repository at this point in the history
jordens committed Jul 15, 2016
1 parent ce73e8e commit 25a9d34
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions artiq/frontend/artiq_flash.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import os
import subprocess
import tempfile
import site
import shutil

from artiq import __artiq_dir__ as artiq_dir
from artiq.frontend.bit2bin import bit2bin
@@ -77,11 +77,12 @@ def main():
raise SystemExit("Binaries directory '{}' does not exist"
.format(opts.dir))

conda_prefix_path = site.getsitepackages()[0]
scripts_path = ["share", "openocd", "scripts"]
if os.name == "nt":
scripts_path = os.path.join(conda_prefix_path, "Library", "share", "openocd", "scripts")
else:
scripts_path = os.path.join(conda_prefix_path, "share", "openocd", "scripts")
scripts_path.insert(0, "Library")
scripts_path = os.path.abspath(os.path.join(
os.path.dirname(shutil.which("openocd")),
"..", *scripts_path))

conv = False

0 comments on commit 25a9d34

Please sign in to comment.