def __init__(self, profCtx, targStore): base.BaseStoreContext.__init__(self, profCtx, targStore) self._variables.addVar("targetName", self.name) subdir = self.store.subdir or "" subdir = fileutils.str2path(subdir) subdir = fileutils.ensureRelDirPath(subdir) subdir = fileutils.cleanupPath(subdir) self._variables.addVar("targetSubdir", subdir) targPath = (fileutils.joinPath(self._variables["sourceDir"], subdir) + self._variables["sourceFile"]) self._variables.addFileVars(fileutils.ensureRelPath(targPath), "target", extension=self.extension)
def __get__(self, obj, type=None): template = getattr(obj, self._templatePropertyName) path = obj._variables.substitute(template) path = fileutils.ensureRelPath(path) return fileutils.cleanupPath(path)
def doneRepRelPath(self): path = self._variables.substitute(self.reportFileTemplate) path = fileutils.ensureRelPath(path) return fileutils.cleanupPath(path)
def configRelPath(self): path = self._variables.substitute(self.configFileTemplate) path = fileutils.ensureRelPath(path) return fileutils.cleanupPath(path)