[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r10179 - in trunk/gnue-common: . utils/helpers
From: |
reinhard |
Subject: |
[gnue] r10179 - in trunk/gnue-common: . utils/helpers |
Date: |
Wed, 5 May 2010 03:49:04 -0500 (CDT) |
Author: reinhard
Date: 2010-05-05 03:49:04 -0500 (Wed, 05 May 2010)
New Revision: 10179
Modified:
trunk/gnue-common/
trunk/gnue-common/utils/helpers/files.py
trunk/gnue-common/utils/helpers/tools.py
Log:
Some changes for new directory layout.
Property changes on: trunk/gnue-common
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2010-05-05 10:18:35.592999935 +0200
committer: Reinhard Müller <address@hidden>
properties:
branch-nick: common
+ timestamp: 2010-05-05 10:47:42.713000059 +0200
committer: Reinhard Müller <address@hidden>
properties:
branch-nick: common
Name: bzr:file-ids
- utils/make-packages
address@hidden:trunk%2Fgnue-common:utils%2Fmake-packages
utils/release address@hidden:trunk%2Fgnue-common:utils%2Frelease
utils/update-tool-docs
address@hidden:trunk%2Fgnue-common:utils%2Fupdate-tool-docs
+ utils/helpers/files.py
address@hidden:trunk%2Fgnue-common:utils%2Fhelpers%2Ffiles.py
utils/helpers/tools.py
address@hidden:trunk%2Fgnue-common:utils%2Fhelpers%2Ftools.py
Name: bzr:revision-id:v4
- 3116 address@hidden
3117 address@hidden
3118 address@hidden
3119 address@hidden
+ 3116 address@hidden
3117 address@hidden
3118 address@hidden
3119 address@hidden
3120 address@hidden
Name: bzr:text-parents
- utils/make-packages
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10122
utils/release
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10121
utils/update-tool-docs
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10119
+ utils/helpers/files.py
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:5356
utils/helpers/tools.py
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9992
Modified: trunk/gnue-common/utils/helpers/files.py
===================================================================
--- trunk/gnue-common/utils/helpers/files.py 2010-05-05 08:39:32 UTC (rev
10178)
+++ trunk/gnue-common/utils/helpers/files.py 2010-05-05 08:49:04 UTC (rev
10179)
@@ -21,7 +21,7 @@
def openModuleFile(module,file):
"""
- Open a file in the gnue-<module>/ directory.
+ Open a file in the tools/<module>/ directory.
Returns None if file doesn't exist.
Note: First tries to read the <module>.<file> directory
@@ -32,7 +32,7 @@
'release-files',module.lower()+'.' + file.replace('/','.')))
except IOError:
try:
- return open (os.path.join(SVN_BASE,'gnue-%s' % module.lower(), file))
+ return open (os.path.join(SVN_BASE,'tools',module.lower(), file))
except IOError:
return None
@@ -43,7 +43,7 @@
Useful for getting data from __init__.py
"""
oldpath = sys.path[:]
- sys.path.insert(0,os.path.join(SVN_BASE,('gnue-%s' % module) + '/' + path))
+ sys.path.insert(0,os.path.join(SVN_BASE,'tools',module,path))
src = dyn_import(imp)
sys.path = oldpath
sys.modules.pop(imp)
Modified: trunk/gnue-common/utils/helpers/tools.py
===================================================================
--- trunk/gnue-common/utils/helpers/tools.py 2010-05-05 08:39:32 UTC (rev
10178)
+++ trunk/gnue-common/utils/helpers/tools.py 2010-05-05 08:49:04 UTC (rev
10179)
@@ -24,16 +24,16 @@
self.name = self.imported.TITLE
self.package = self.imported.PACKAGE
except AttributeError:
- print "WARNING: gnue-%s/__init__.py does not define 'TITLE'" % (tool)
+ print "WARNING: %s/__init__.py does not define 'TITLE'" % (tool)
self.name = tool
except ImportError:
- print "WARNING: cannot import gnue-%s/src" % (tool)
+ print "WARNING: cannot import %s/src" % (tool)
self.imported = None
self.name = tool
# Check for COPYING file
- if not os.path.isfile(os.path.join(SVN_BASE,'gnue-'+tool,'COPYING')):
- print "WARNING: gnue-%s has no COPYING file" % tool
+ if not os.path.isfile(os.path.join(SVN_BASE,'tools',tool,'COPYING')):
+ print "WARNING: %s has no COPYING file" % tool
@@ -49,7 +49,7 @@
file = openModuleFile(tool,'NEWS')
self.tool = tool
if not file:
- print "WARNING: gnue-%s has no NEWS file" % (tool)
+ print "WARNING: %s has no NEWS file" % (tool)
self.lines = ()
else:
self.lines = file.readlines()
@@ -114,16 +114,16 @@
def __init__(self, tool):
file = openModuleFile(tool,'FAQ')
if not file:
- print "WARNING: gnue-%s has no FAQ file" % (tool)
+ print "WARNING: %s has no FAQ file" % (tool)
file = StringIO()
- SubheadedFile.__init__(self, file, 'gnue-%s/FAQ' % tool)
+ SubheadedFile.__init__(self, file, 'tools/%s/FAQ' % tool)
file.close()
# Check for missing sections
for section in ('GENERAL',):
if not self.sections.has_key(section):
- print "WARNING: gnue-%s/FAQ has no %s section" % (tool, section)
+ print "WARNING: %s/FAQ has no %s section" % (tool, section)
def asHTML(self, section, default=""):
@@ -138,16 +138,16 @@
def __init__(self, tool):
file = openModuleFile(tool,'README')
if not file:
- print "WARNING: gnue-%s has no README file" % (tool)
+ print "WARNING: %s has no README file" % (tool)
file = StringIO()
- SubheadedFile.__init__(self, file, 'gnue-%s/README' % tool)
+ SubheadedFile.__init__(self, file, 'tools/%s/README' % tool)
file.close()
# Check for missing sections
for section in ('LICENSE','INTRODUCTION','INSTALLATION'):
if not self.sections.has_key(section):
- print "WARNING: gnue-%s/README has no %s section" % (tool, section)
+ print "WARNING: %s/README has no %s section" % (tool, section)
######################################################################
##
@@ -156,16 +156,16 @@
def __init__(self, tool):
file = openModuleFile(tool,'INSTALL')
if not file:
- print "WARNING: gnue-%s has no INSTALL file" % (tool)
+ print "WARNING: %s has no INSTALL file" % (tool)
file = StringIO()
- SubheadedFile.__init__(self, file, 'gnue-%s/INSTALL' % tool)
+ SubheadedFile.__init__(self, file, 'tools/%s/INSTALL' % tool)
file.close()
# Check for missing sections
for section in ['REQUIREMENTS']:
if not self.sections.has_key(section):
- print "WARNING: gnue-%s/INSTALL has no %s section" % (tool, section)
+ print "WARNING: %s/INSTALL has no %s section" % (tool, section)
######################################################################
@@ -175,7 +175,7 @@
def __init__(self, tool):
file = openModuleFile(tool,'po/STATISTICS')
if not file:
- print "WARNING: gnue-%s has no po/STATISTICS file" % (tool)
+ print "WARNING: %s has no po/STATISTICS file" % (tool)
lines = ()
else:
lines = file.readlines()
@@ -186,7 +186,7 @@
try:
lang, extra = line.strip().split(':')
except ValueError:
- print "WARNING: gnue-%s/po/STATISTICS has an invalid line" % (tool)
+ print "WARNING: %s/po/STATISTICS has an invalid line" % (tool)
continue
self.trans[lang] = trans = {'translated': 0, 'fuzzy': 0, 'untranslated':
0}
@@ -195,7 +195,7 @@
cnt, code, extra = extra.strip().split(' ',3)
trans[code] = float(cnt) # Must be float so python integer math
doesn't happen
except ValueError:
- print "WARNING: gnue-%s/po/STATISTICS/%s is invalid" % (tool, lang)
+ print "WARNING: %s/po/STATISTICS/%s is invalid" % (tool, lang)
def asHTML(self):
vals = []
@@ -244,7 +244,7 @@
lines = file.readlines()
file.close()
except IOError:
- print "WARNING: gnue-%s has no www/docs/%s.txt" % (tool, tool)
+ print "WARNING: %s has no www/docs/%s.txt" % (tool, tool)
lines = []
in_header = False
@@ -281,9 +281,9 @@
elif audience.lower() == 'coredeveloper':
self.corefiles.append(current)
else:
- print "WARNING: gnue-%s www/docs/%s.txt has invalid audience:
%s" % (tool, tool, value)
+ print "WARNING: %s www/docs/%s.txt has invalid audience: %s" %
(tool, tool, value)
except ValueError:
- print "WARNING: gnue-%s www/docs/%s.txt has invalid header line:" %
(tool, tool)
+ print "WARNING: %s www/docs/%s.txt has invalid header line:" %
(tool, tool)
print " ", line
else:
text.append(line)
@@ -300,7 +300,7 @@
for file in glob.glob(dest+props['location'] + '.*'):
files.append(file[len(dest):])
if not files:
- print "WARNING: gnue-%s refers to doc %s.*, but not found: assuming
html" % (self.tool, props['location'])
+ print "WARNING: %s refers to doc %s.*, but not found: assuming html" %
(self.tool, props['location'])
files.append(props['location']+'.html')
else:
files = [props['location']]
@@ -355,12 +355,12 @@
self.notes = []
self.tool = tool
- self.path = path = os.path.join(SVN_BASE,'gnue-%s' % tool,
'doc','technotes')
+ self.path = path = os.path.join(SVN_BASE,'tools',tool,'doc','technotes')
if os.path.exists(path):
for file in glob.glob(path+'/[0-9]*.txt'):
self.notes.append(os.path.split(file)[-1])
else:
- print "WARNING: gnue-%s has no doc/technotes directory" % tool
+ print "WARNING: %s has no doc/technotes directory" % tool
self.notes.sort()
def getTechnote(self, note):
@@ -381,7 +381,7 @@
field, value = line.split(':',1)
props[field.lower()] = value.strip()
except ValueError:
- print "WARNING: gnue-%s doc/technotes/%s has invalid header line:" %
(tool, note)
+ print "WARNING: %s doc/technotes/%s has invalid header line:" %
(tool, note)
print " ", line
text.append(line)
@@ -395,12 +395,12 @@
self.files = []
self.tool = tool
- self.path = path = os.path.join(SVN_BASE,'gnue-%s' % tool, 'doc','man')
+ self.path = path = os.path.join(SVN_BASE,'tools',tool,'doc','man')
if os.path.exists(path):
for file in glob.glob(path+'/*.[1-9]'):
self.files.append(os.path.split(file)[-1])
else:
- print "WARNING: gnue-%s has no doc/man directory" % tool
+ print "WARNING: %s has no doc/man directory" % tool
self.files.sort()
def asHTML(self, file):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r10179 - in trunk/gnue-common: . utils/helpers,
reinhard <=