From bf54425efd3bddbc558f06fe305f5059328ab9ae Mon Sep 17 00:00:00 2001 From: Pawel Szostek <pawel.szostek@cern.ch> Date: Thu, 28 Apr 2011 14:52:16 +0000 Subject: [PATCH] Fixed local manifests' searching --- synthesis/configparser.py | 3 +++ synthesis/module.py | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/synthesis/configparser.py b/synthesis/configparser.py index 784b4022..34658eb2 100644 --- a/synthesis/configparser.py +++ b/synthesis/configparser.py @@ -173,6 +173,9 @@ class ConfigParser(object): raise RuntimeError("Config file should be added only once") + def add_arbitrary_code(self, code): + self.arbitrary_code = code + def parse(self): options = {} ret = {} diff --git a/synthesis/module.py b/synthesis/module.py index b37ba3bf..ff0bba5b 100644 --- a/synthesis/module.py +++ b/synthesis/module.py @@ -21,6 +21,7 @@ class Module(object): self.options["files"] = files if manifest != None and fetchto == None: options["fetchto"] = os.path.dirname(manifest.path) + if manifest != None and url == None and path == None: self.options["url"] = os.path.dirname(manifest.path) self.options["path"] = os.path.dirname(manifest.path) @@ -32,7 +33,7 @@ class Module(object): self.options["path"] = path self.options["url"] = url if manifest == None: - if self.options["path"] != None: + if path != None: self.options["manifest"] = self.search_for_manifest() else: self.options["manifest"] = None @@ -43,6 +44,7 @@ class Module(object): self.options["isfetched"] = True else: self.options["isfetched"] = isfetched + if source != None: if source not in ["local", "svn", "git"]: raise ValueError("Inproper source: " + source) @@ -81,9 +83,10 @@ class Module(object): """ p.vprint("Looking for manifest in " + self.path) for filename in os.listdir(self.path): - if filename == "manifest.py" and not os.path.isdir(filename): - manifest = Manifest(path=os.path.abspath(os.path.join(self.path, filename))) - return manifest + if filename == "manifest.py" or filename == "Manifest.py": + if not os.path.isdir(filename): + manifest = Manifest(path=os.path.abspath(os.path.join(self.path, filename))) + return manifest # no manifest file found return None -- GitLab