From 99dfbbd99d4644253963189d6c6bff300803b164 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 10 Feb 2021 19:47:15 -0300 Subject: [PATCH] Use the full path for kibot in the makefile if not installed. When we detect the run isn't from the system installation. --- kibot/kiplot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kibot/kiplot.py b/kibot/kiplot.py index 78a80141..650327a7 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -344,7 +344,10 @@ def generate_makefile(makefile, cfg_file, outputs): with open(makefile, 'wt') as f: f.write('#!/usr/bin/make\n') f.write('# Automatically generated by KiBot from `{}`\n'.format(cfg_file)) - f.write('KIBOT=kibot\n') + fname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src', 'kibot')) + if not os.path.isfile(fname): + fname = 'kibot' + f.write('KIBOT={}\n'.format(fname)) f.write('DEBUG=\n') f.write('CONFIG={}\n'.format(cfg_file)) f.write('SCH={}\n'.format(os.path.relpath(GS.sch_file)))