[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer src/Instance.py templates/__init_...
From: |
Jason Cater |
Subject: |
gnue/designer src/Instance.py templates/__init_... |
Date: |
Wed, 13 Nov 2002 22:45:40 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/11/13 22:45:40
Modified files:
designer/src : Instance.py
designer/templates: __init__.py
designer/templates/schema: Introspection.py
Log message:
Applied btami's McMillan-workaround patches
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/Instance.py.diff?cvsroot=OldCVS&tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/templates/__init__.py.diff?cvsroot=OldCVS&tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/templates/schema/Introspection.py.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gnue/designer/src/Instance.py
diff -c gnue/designer/src/Instance.py:1.66 gnue/designer/src/Instance.py:1.67
*** gnue/designer/src/Instance.py:1.66 Mon Oct 7 22:24:26 2002
--- gnue/designer/src/Instance.py Wed Nov 13 22:45:40 2002
***************
*** 492,517 ****
def loadWizards(self, package):
templates = []
! basedir = os.path.dirname(package.__file__)
! processed = [] # Base file names processed (e.g., base of Simple.py*
# is Simple) This will keep us from importing Simple
# three times if Simple.py, Simple.pyc, and Simple.lib
# all exist.
! for dir in dircache.listdir(basedir):
! base = string.split(dir,'.')[0]
! if not dir[0] in ('.','_') and not base in processed:
! processed.append(base)
! try:
! templates.append(dyn_import(
! '%s.%s' % (package.__name__,base)).TemplateInformation)
! except ImportError, mesg:
! GDebug.printMesg(2,"%s.%s doesn't appear to be a valid wizard" %
(package.__name__, base))
! GDebug.printMesg(5,' --> %s' % (mesg))
! except AttributeError:
! GDebug.printMesg(2,'Wizard %s for package %s is missing'
! ' an \'TemplateInformation\' attribute.' %
! (base,package.__name__))
for template in templates:
try:
--- 492,542 ----
def loadWizards(self, package):
templates = []
!
! ############################
! # This is a workaround for McMillan packaging!!!
! # gnue.designer.WizardFiles.py
! # is autocreated at McMillan's analysis time by
! # hook-gnue.designer.Designer.py
! # It contains a list of available wizards.
! # McMillan sets sys.frozen=1 in packaged exe file.
! ############################
! if hasattr(sys, 'frozen'):
! from gnue.designer import WizardFiles
! for template in WizardFiles.WizardFiles:
! t = template.split('.')
! if '.'.join(t[0:4]) == package.__name__:
! try:
! templates.append(dyn_import('%s' % template).TemplateInformation)
! except ImportError:
! pass
! except AttributeError:
! pass
! else:
! ############
! # end of workaround
! ############
!
! basedir = os.path.dirname(package.__file__)
! processed = [] # Base file names processed (e.g., base of Simple.py*
# is Simple) This will keep us from importing Simple
# three times if Simple.py, Simple.pyc, and Simple.lib
# all exist.
! for dir in dircache.listdir(basedir):
! base = string.split(dir,'.')[0]
! if not dir[0] in ('.','_') and not base in processed:
! processed.append(base)
! try:
! templates.append(dyn_import(
! '%s.%s' % (package.__name__,base)).TemplateInformation)
! except ImportError, mesg:
! GDebug.printMesg(2,"%s.%s doesn't appear to be a valid wizard" %
(package.__name__, base))
! GDebug.printMesg(5,' --> %s' % (mesg))
! except AttributeError:
! GDebug.printMesg(2,'Wizard %s for package %s is missing'
! ' an \'TemplateInformation\' attribute.' %
! (base,package.__name__))
for template in templates:
try:
Index: gnue/designer/templates/__init__.py
diff -c gnue/designer/templates/__init__.py:1.9
gnue/designer/templates/__init__.py:1.10
*** gnue/designer/templates/__init__.py:1.9 Tue Sep 17 11:27:45 2002
--- gnue/designer/templates/__init__.py Wed Nov 13 22:45:40 2002
***************
*** 40,52 ****
def GetAvailablePackages():
packages = []
! basedir = os.path.dirname(__file__)
! for dir in dircache.listdir(basedir):
! if os.path.isdir(os.path.join(basedir, dir)):
try:
! packages.append(dyn_import('gnue.designer.templates.%s' %dir))
except ImportError:
pass
return packages
--- 40,57 ----
def GetAvailablePackages():
packages = []
! Tools = (
! 'navigator',
! 'forms',
! 'reports',
! 'schema')
!
! for tool in Tools:
try:
! packages.append(dyn_import('gnue.designer.templates.%s' %tool))
except ImportError:
pass
+
return packages
***************
*** 59,77 ****
def GetAvailableTemplates(package):
templates = []
! basedir = os.path.dirname(package.__file__)
! processed = [] # Base file names processed (e.g., base of Simply.py*
# is Simple) This will keep us from importing Simple
# three times if Simple.py, Simple.pyc, and Simple.lib
# all exist.
! for dir in dircache.listdir(basedir):
! base = string.split(dir,'.')[0]
! if not dir[0] in ('.','_') and not base in processed:
! processed.append(base)
! try:
! templates.append(dyn_import(
! '%s.%s' % (package.__name__,base)).TemplateInformation)
! except ImportError:
! pass
return templates
--- 64,106 ----
def GetAvailableTemplates(package):
templates = []
!
! ############################
! # This is a workaround for McMillan packaging!!!
! # gnue.designer.TemplateFiles.py
! # is autocreated at McMillan's analysis time by
! # hook-gnue.designer.TemplateChooser.py
! # It contains a list of available templates.
! # McMillan sets sys.frozen=1 in packaged exe file.
! ############################
! import sys
! if hasattr(sys, 'frozen'):
! from gnue.designer import TemplateFiles
! for template in TemplateFiles.TemplateFiles:
! t = template.split('.')
! if '.'.join(t[0:4]) == package.__name__:
! try:
! templates.append(dyn_import('%s' % template).TemplateInformation)
! except ImportError:
! pass
! else:
! ############
! # end of workaround
! ############
!
! basedir = os.path.dirname(package.__file__)
! processed = [] # Base file names processed (e.g., base of Simply.py*
# is Simple) This will keep us from importing Simple
# three times if Simple.py, Simple.pyc, and Simple.lib
# all exist.
! for dir in dircache.listdir(basedir):
! base = string.split(dir,'.')[0]
! if not dir[0] in ('.','_') and not base in processed:
! processed.append(base)
! try:
! templates.append(dyn_import(
! '%s.%s' % (package.__name__,base)).TemplateInformation)
! except ImportError:
! pass
return templates
Index: gnue/designer/templates/schema/Introspection.py
diff -c gnue/designer/templates/schema/Introspection.py:1.6
gnue/designer/templates/schema/Introspection.py:1.7
*** gnue/designer/templates/schema/Introspection.py:1.6 Fri Aug 16 00:51:29 2002
--- gnue/designer/templates/schema/Introspection.py Wed Nov 13 22:45:40 2002
***************
*** 134,141 ****
# Create the tables and fields...
print "Adding <tables>"
tables = self.AddElement('tables', self.root, {})
-
- print self.root._children
# Create each table
for tablename in tablesorted:
--- 134,139 ----
***************
*** 154,160 ****
# Add length if appropriate for this datatype
try:
! attrs['size'] = int(field.length)
except AttributeError:
pass
--- 152,158 ----
# Add length if appropriate for this datatype
try:
! attrs['length'] = int(field.length)
except AttributeError:
pass
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer src/Instance.py templates/__init_...,
Jason Cater <=