From: jpathy <15735913+jpathy@users.noreply.github.com> Date: Mon, 6 Aug 2018 06:51:07 +0000 (+0000) Subject: Use `realpath` X-Git-Tag: yosys-0.8~43^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7db05b2cc1befba7e9d7afbb270dd503e8ec5857;p=yosys.git Use `realpath` Use `os.path.realpath` instead to make sure symlinks are followed. This is also required to work for nix package manager. --- diff --git a/backends/smt2/Makefile.inc b/backends/smt2/Makefile.inc index eacda2734..dce82f01a 100644 --- a/backends/smt2/Makefile.inc +++ b/backends/smt2/Makefile.inc @@ -6,7 +6,7 @@ ifneq ($(CONFIG),emcc) TARGETS += yosys-smtbmc yosys-smtbmc: backends/smt2/smtbmc.py - $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new + $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new $(Q) chmod +x $@.new $(Q) mv $@.new $@