diff -r be27ed110b50 -r d8ac696cc51f buildframework/helium/tools/common/docs.ant.xml --- a/buildframework/helium/tools/common/docs.ant.xml Wed Oct 28 14:39:48 2009 +0000 +++ b/buildframework/helium/tools/common/docs.ant.xml Wed Dec 23 19:29:07 2009 +0200 @@ -110,10 +110,10 @@ Python modules path: ${epydoc.python.modules.path} - - + + - + @@ -258,7 +258,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -645,6 +645,7 @@ import amara import codecs import ant +import docs setpath = r'${helium.dir}'+'/tools' @@ -654,43 +655,11 @@ dbPath = 'file:///'+ dbPath.replace('\\','/') dbPrj = amara.parse(dbPath) -for root, dirs, files in os.walk(setpath, topdown=False): - for fname in files: - filePattern = re.compile('.ant.xml$') - fileMatch = filePattern.search(fname) - modulelist = [] - if (fileMatch): - filePath = os.path.abspath(os.path.join(root, fname)) - with open(filePath) as f: - filePathAmara = 'file:///'+ filePath.replace('\\','/') - curPrj=amara.parse(filePathAmara) - for line in f: - linePattern = re.compile('^import') - lineMatch = linePattern.search(line) - if ((lineMatch) and (line.find('.')==-1)): - newLine = line.replace('import','') - newLine = newLine.replace(',','') - moduleArray = newLine.split() - for curModule in moduleArray: - try: - importModule = __import__(curModule) - modulePath=importModule.__file__ - if (modulePath.find('\\helium\\tools')!= -1): - for projectList in dbPrj.antDatabase.project: - if (projectList.name==curPrj.project.name): - if not (curModule in modulelist): - print " Python module : " +curModule - moduleElement = projectList.pythonDependency.xml_create_element(u'module', content=u''+curModule) - projectList.pythonDependency.xml_append(moduleElement) - modulelist = modulelist + [curModule] - except Exception, e: - error ="yes" - +docs.find_python_dependencies(setpath, dbPath, dbPrj) file_object = codecs.open(r'${database.file}', 'w', "utf_8") file_object.write(dbPrj.xml(indent=u"yes")) file_object.close() - @@ -841,12 +810,6 @@ - - - - - -