from ino.utils import SpaceList, list_subdirs from ino.conf import configure from ino.exc import Abort from ino.filters import colorize from ino.environment import Environment from ino.argparsing import FlexiFormatter base_dir = os.path.realpath(os.getcwd()) environment = Environment() environment.load() # Override source directory name environment.src_dir = 'thermocouple' environment.extra_libs = [os.path.join(base_dir, environment.src_dir)] environment.build_base = 'build' environment.output_dir = os.path.join(environment.build_base, environment.src_dir) class CleanAll(Clean): def __init__(self, environment): environment.output_dir = environment.build_base Clean.__init__(self, environment) class Build(OldBuild): def scan_dependencies(self): src_dir = os.path.realpath(self.e.src_dir) self.e['deps'] = SpaceList() lib_dirs = [self.e.arduino_core_dir, src_dir] + list_subdirs(self.e.lib_dir) + list_subdirs(self.e.arduino_libraries_dir) lib_dirs.extend(self.e.extra_libs)