commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue appserver/MANIFEST.in appserver/setup.py a...


From: Jason Cater
Subject: gnue appserver/MANIFEST.in appserver/setup.py a...
Date: Sun, 02 Jun 2002 18:21:43 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/06/02 18:21:43

Modified files:
        appserver      : MANIFEST.in setup.py 
        appserver/src  : geasRpcServer.py 
        common         : MANIFEST.in 
        common/src     : GBaseApp.py 
        designer       : MANIFEST.in setup.py 
        designer/src   : Designer.py 
        forms          : MANIFEST.in setup.py 
        forms/src      : GFClient.py 
        navigator/src  : GNClient.py 
        reports        : MANIFEST.in setup.py 
        reports/src    : GRRun.py GRServer.py 

Log message:
        Added --generate-man-page to GBaseApp and updated the setup.py's to 
create the manpages before creating a source distribution

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/appserver/MANIFEST.in.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/appserver/setup.py.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/appserver/src/geasRpcServer.py.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/MANIFEST.in.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GBaseApp.py.diff?cvsroot=OldCVS&tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/MANIFEST.in.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/setup.py.diff?cvsroot=OldCVS&tr1=1.29&tr2=1.30&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/Designer.py.diff?cvsroot=OldCVS&tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/MANIFEST.in.diff?cvsroot=OldCVS&tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/setup.py.diff?cvsroot=OldCVS&tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFClient.py.diff?cvsroot=OldCVS&tr1=1.41&tr2=1.42&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/navigator/src/GNClient.py.diff?cvsroot=OldCVS&tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/MANIFEST.in.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/setup.py.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRRun.py.diff?cvsroot=OldCVS&tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRServer.py.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gnue/appserver/MANIFEST.in
diff -c gnue/appserver/MANIFEST.in:1.2 gnue/appserver/MANIFEST.in:1.3
*** gnue/appserver/MANIFEST.in:1.2      Sun Jun  2 18:07:25 2002
--- gnue/appserver/MANIFEST.in  Sun Jun  2 18:21:41 2002
***************
*** 15,18 ****
--- 15,20 ----
  recursive-include doc *.txt *.pdf *.html
  recursive-include grpc * 
  recursive-include scripts *.in
+ include man/*.1
+ 
  prune .cvsignore
Index: gnue/appserver/setup.py
diff -c gnue/appserver/setup.py:1.5 gnue/appserver/setup.py:1.6
*** gnue/appserver/setup.py:1.5 Sat Jun  1 13:47:33 2002
--- gnue/appserver/setup.py     Sun Jun  2 18:21:41 2002
***************
*** 73,78 ****
--- 73,90 ----
  make txt
  make pdf
  """)
+ 
+   print "Now, we are going to create the man pages for our tools."
+   os.system( """
+ if [ ! -e man ]
+ then
+ mkdir man
+ fi
+ cd man
+ ../server/gacvs --generate-man-page
+ """)
+ 
+ 
  if ('build' in sys.argv) or ('install' in sys.argv):
  
    ## TODO: These checks will not work as gnue.common
***************
*** 254,259 ****
--- 266,281 ----
    else:
      print "WARNING: File %s does not exist... not installing!" % file
  
+ manfiles = []
+ for file in ('man/gnue-appserver.1',
+              'man/geas.1'):
+   if os.path.isfile(file):
+     manfiles.append(file)
+   else:
+     print "WARNING: File %s does not exist... not installing!" % file
+ 
+ 
+ 
  #
  # You can run:
  #   $ GNUE_VERSION_SUFFIX=-pre1 ./setup.py sdist
***************
*** 276,281 ****
--- 298,304 ----
         cmdclass = {'build_scripts':my_build_scripts},
  
         data_files = [ ('doc/appserver', docfiles),
+                       ('man', manfiles),
                        ('samples/appserver',['samples/appservertest.gfd',
                                    'samples/setup-pgsql.sh',
  #                                  'samples/setup-mysql.sh'
Index: gnue/appserver/src/geasRpcServer.py
diff -c gnue/appserver/src/geasRpcServer.py:1.6 
gnue/appserver/src/geasRpcServer.py:1.7
*** gnue/appserver/src/geasRpcServer.py:1.6     Sun Jun  2 18:07:25 2002
--- gnue/appserver/src/geasRpcServer.py Sun Jun  2 18:21:41 2002
***************
*** 1,25 ****
  # GNU Enterprise Application Server - RPC Server Application
  #
- # Copyright 2001 Free Software Foundation
- #
  # This file is part of GNU Enterprise.
  #
! # GNU Enterprise is free software; you can redistribute it 
! # and/or modify it under the terms of the GNU General Public 
! # License as published by the Free Software Foundation; either 
  # version 2, or (at your option) any later version.
  #
! # GNU Enterprise is distributed in the hope that it will be 
! # useful, but WITHOUT ANY WARRANTY; without even the implied 
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  # PURPOSE. See the GNU General Public License for more details.
  #
! # You should have received a copy of the GNU General Public 
! # License along with program; see the file COPYING. If not, 
! # write to the Free Software Foundation, Inc., 59 Temple Place 
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
! # $Id: geasRpcServer.py,v 1.6 2002/06/02 22:07:25 siesel Exp $
  
  from geasList import *
  from geasSession import *
--- 1,25 ----
  # GNU Enterprise Application Server - RPC Server Application
  #
  # This file is part of GNU Enterprise.
  #
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
  # version 2, or (at your option) any later version.
  #
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  # PURPOSE. See the GNU General Public License for more details.
  #
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
! # Copyright 2001-2002 Free Software Foundation
! #
! # $Id: geasRpcServer.py,v 1.7 2002/06/02 22:21:41 jcater Exp $
  
  from geasList import *
  from geasSession import *
***************
*** 27,39 ****
  class geasSessionManager:
    def __init__(self):
      self._sessNo=0
!     
!   def getNewSession(self):    
      self._sessNo=self._sessNo+1
      sess=geasSession (self._connections)
      sess._database=self._database
      return sess
!   
    def setConnections(self,connections):
      self._connections=connections
  
--- 27,39 ----
  class geasSessionManager:
    def __init__(self):
      self._sessNo=0
! 
!   def getNewSession(self):
      self._sessNo=self._sessNo+1
      sess=geasSession (self._connections)
      sess._database=self._database
      return sess
! 
    def setConnections(self,connections):
      self._connections=connections
  
***************
*** 47,53 ****
      pass
  
    def Status(self):
!     if self._sessNo==0:      
        return "Running (no sessions created yet)"
      else:
        return "Running (%s session created)" % self._sessNo
--- 47,53 ----
      pass
  
    def Status(self):
!     if self._sessNo==0:
        return "Running (no sessions created yet)"
      else:
        return "Running (%s session created)" % self._sessNo
***************
*** 55,60 ****
--- 55,61 ----
  from gnue.common import GComm, openResource, GLoginHandler
  from gnue.common.GServerApp import GServerApp,GConfig
  import time,os,sys
+ from gnue.appserver import VERSION
  
  # 
=============================================================================
  # RPC application class
***************
*** 63,73 ****
  class geasRpcServer(GServerApp):
  
    NAME = "GNUe Application Server"
!   VERSION = "0.0.1"
!   COMMAND = "geas"
!   USAGE = "%s [options]" % COMMAND  
!   COMMAND_OPTIONS = [    
!     [ 'rpctype',None,'rpc_type',1,"xmlrpc", 'type',
        _('Set the GNURPC connection type. The currently supported values ')+
        _("for <type> are 'xmlrpc' and 'pw_xmlrpc'. For more information on ")+
        _('GNURPC connection types have a look at ')+
--- 64,79 ----
  class geasRpcServer(GServerApp):
  
    NAME = "GNUe Application Server"
!   VERSION = VERSION
!   USAGE = GServerApp.USAGE
!   COMMAND = 'geas'
!   SUMMARY = "GNUe Application Server is a data and business rules server. " \
!           + "It provides a backend to forms and reports. In an n-tier " \
!           + "environment, GEAS holds all business rules/logic and provides " \
!           + "data access to various database backends."
! 
!   COMMAND_OPTIONS = [
!     [ 'rpctype',None,'rpc-type',1,"xmlrpc", 'type',
        _('Set the GNURPC connection type. The currently supported values ')+
        _("for <type> are 'xmlrpc' and 'pw_xmlrpc'. For more information on ")+
        _('GNURPC connection types have a look at ')+
***************
*** 80,104 ****
        _('Set the username for the used database.')],
      [ 'password',"p",'password',1,None, 'password',
        _('Set the password for the used database.')]]
-   SUMMARY = \
-           _("GNUe Application Server is the core of the n-tier variant of " \
-             "the GNU Enterprise system.")
  
!   
    ## set a list of transports
    def setTransports(self,transports):
!     
      self._transports=transports
  
  
    def phaseInit(self):
      if self.OPTIONS["rpctype"]=="xmlrpc":
!       
        print "Exporting our services via xmlrpc (port 8765) ..."
        self.setTransports({'xmlrpc':{ 'port': 8765 }})
!       
      elif self.OPTIONS["rpctype"]=="pw_xmlrpc":
!     
        print "Exporting our services via pw_xmlrpc (port 8765) ..."
        self.setTransports({'pw_xmlrpc':{ 'port': 8765 }})
  
--- 86,107 ----
        _('Set the username for the used database.')],
      [ 'password',"p",'password',1,None, 'password',
        _('Set the password for the used database.')]]
  
! 
    ## set a list of transports
    def setTransports(self,transports):
! 
      self._transports=transports
  
  
    def phaseInit(self):
      if self.OPTIONS["rpctype"]=="xmlrpc":
! 
        print "Exporting our services via xmlrpc (port 8765) ..."
        self.setTransports({'xmlrpc':{ 'port': 8765 }})
! 
      elif self.OPTIONS["rpctype"]=="pw_xmlrpc":
! 
        print "Exporting our services via pw_xmlrpc (port 8765) ..."
        self.setTransports({'pw_xmlrpc':{ 'port': 8765 }})
  
Index: gnue/common/MANIFEST.in
diff -c gnue/common/MANIFEST.in:1.7 gnue/common/MANIFEST.in:1.8
*** gnue/common/MANIFEST.in:1.7 Sat Jun  1 13:47:34 2002
--- gnue/common/MANIFEST.in     Sun Jun  2 18:21:41 2002
***************
*** 16,19 ****
  include scripts/*
  recursive-include translations *
  
- 
--- 16,18 ----
Index: gnue/common/src/GBaseApp.py
diff -c gnue/common/src/GBaseApp.py:1.20 gnue/common/src/GBaseApp.py:1.21
*** gnue/common/src/GBaseApp.py:1.20    Sat Jun  1 15:35:52 2002
--- gnue/common/src/GBaseApp.py Sun Jun  2 18:21:41 2002
***************
*** 41,51 ****
  import os
  import ConfigParser
  import gettext
  
  try:
    
gettext.install('gnue',GConfig.getInstalledBase('install_prefix')+'/translations')
  except IOError:
!   sys.stderr.write('Unable to load locale information falling back to default 
English language translations.\n')    
    import __builtin__
    __builtin__.__dict__['_'] = lambda string:string
  
--- 41,52 ----
  import os
  import ConfigParser
  import gettext
+ from gnue.common import lineWrap
  
  try:
    
gettext.install('gnue',GConfig.getInstalledBase('install_prefix')+'/translations')
  except IOError:
! #  sys.stderr.write('Unable to load locale information falling back to 
default English language translations.\n')
    import __builtin__
    __builtin__.__dict__['_'] = lambda string:string
  
***************
*** 61,67 ****
    COMMAND_OPTIONS = []  # Should be in same format as _base_options below
    SUMMARY = "A brief summary of the program goes here."
    COMMAND = "app"
!   USAGE = "%s [options] file"
  
  
    #  Run the program
--- 62,75 ----
    COMMAND_OPTIONS = []  # Should be in same format as _base_options below
    SUMMARY = "A brief summary of the program goes here."
    COMMAND = "app"
!   USAGE = "[options]"
! 
! 
!   # More options, but won't be changed unless
!   # this is a non-GNUe app using GNUe-Common
!   AUTHOR = "GNU Enterprise Project"
!   EMAIL = "address@hidden"
!   REPORT_BUGS_TO = "Please report any bugs to address@hidden"
  
  
    #  Run the program
***************
*** 107,112 ****
--- 115,122 ----
             _('Displays this help screen.') ],
           [ 'configuration_options', None, 'configuration-options', 0, None, 
None,
             _('Displays a list of valid configuration file entries, their 
purpose, and their default values.') ],
+          [ 'man_page', None, 'generate-man-page', 0, None, None,
+            _('Generates a groff-formatted man page as a file in the current 
directory.') ],
           [ 'profile', None, 'profile', 0, None, None,
             _("Run Python's built-in profiler and display the resulting ") + \
             _("run statistics.") ],
***************
*** 141,153 ****
            lo = lo + '='
            shortoptions = shortoptions + ':'
          longoptions.append(lo)
!  
      try:
        opt, self.ARGUMENTS = getopt.getopt(sys.argv[1:], shortoptions, 
longoptions)
!     except getopt.error, msg: 
        self.handleStartupError(msg)
  
!     for o in opt: 
        if len(o[1]):
          self.OPTIONS[lookup[o[0]]] = o[1]
        else:
--- 151,163 ----
            lo = lo + '='
            shortoptions = shortoptions + ':'
          longoptions.append(lo)
! 
      try:
        opt, self.ARGUMENTS = getopt.getopt(sys.argv[1:], shortoptions, 
longoptions)
!     except getopt.error, msg:
        self.handleStartupError(msg)
  
!     for o in opt:
        if len(o[1]):
          self.OPTIONS[lookup[o[0]]] = o[1]
        else:
***************
*** 159,170 ****
      elif self.OPTIONS['version']:
        self.printVersion()
        sys.exit()
      elif self.OPTIONS['configuration_options']:
        print GConfig.printableConfigOptions(defaults)
        sys.exit()
  
      self._run = self.run
!     
      # Should we profile?
      if self.OPTIONS['profile']:
        self.run = self._profile
--- 169,183 ----
      elif self.OPTIONS['version']:
        self.printVersion()
        sys.exit()
+     elif self.OPTIONS['man_page']:
+       self.dumpManPage()
+       sys.exit()
      elif self.OPTIONS['configuration_options']:
        print GConfig.printableConfigOptions(defaults)
        sys.exit()
  
      self._run = self.run
! 
      # Should we profile?
      if self.OPTIONS['profile']:
        self.run = self._profile
***************
*** 173,179 ****
      # Should we run in debugger?
      if self.OPTIONS['debugger']:
        self.run = self._debugger
!       
      try:
        GDebug.setDebug(int("%s" % self.OPTIONS['debug_level']),
            self.OPTIONS['debug_file'])
--- 186,192 ----
      # Should we run in debugger?
      if self.OPTIONS['debugger']:
        self.run = self._debugger
! 
      try:
        GDebug.setDebug(int("%s" % self.OPTIONS['debug_level']),
            self.OPTIONS['debug_file'])
***************
*** 243,272 ****
      print _("GNUe Common Version %s\n") % commonVersion
  
    #
!   #  Display version information for this program
    #
!   def printHelp(self): 
      allOptions = {}
      descriptors = {}
      maxLength = 0
  
!     for optionset in [self._base_options, self.COMMAND_OPTIONS]: 
!       for option in optionset:  
          allOptions[string.upper(option[2])] = option
  
!         if option[5]: 
            descr = '--%s <%s>' % (option[2], option[5])
!         else: 
            descr = '--%s' % (option[2])
!         if option[1]: 
            descr += ', -%s' % option[1]
  
          descriptors[string.upper(option[2])] = descr
  
!         if len(descr) > maxLength: 
            maxLength = len(descr)
  
!     if maxLength > 20: 
        maxLength = 20
  
      sorted = allOptions.keys()
--- 256,285 ----
      print _("GNUe Common Version %s\n") % commonVersion
  
    #
!   #  Display help information for this program
    #
!   def printHelp(self):
      allOptions = {}
      descriptors = {}
      maxLength = 0
  
!     for optionset in [self._base_options, self.COMMAND_OPTIONS]:
!       for option in optionset:
          allOptions[string.upper(option[2])] = option
  
!         if option[5]:
            descr = '--%s <%s>' % (option[2], option[5])
!         else:
            descr = '--%s' % (option[2])
!         if option[1]:
            descr += ', -%s' % option[1]
  
          descriptors[string.upper(option[2])] = descr
  
!         if len(descr) > maxLength:
            maxLength = len(descr)
  
!     if maxLength > 20:
        maxLength = 20
  
      sorted = allOptions.keys()
***************
*** 280,293 ****
        width = 78 - margin
        pos = 0
  
!       if len(descriptors[optionKey]) > maxLength: 
          dispOptions += "\n  %s\n%s" % (descriptors[optionKey], " " * margin)
!       else: 
!         dispOptions += "\n  %s  %s" % (descriptors[optionKey],  
                 " " * (maxLength - len(descriptors[optionKey])))
  
!       for word in string.split(allOptions[optionKey][6]): 
!         if (len(word) + pos) > width: 
            pos = 0
            dispOptions = dispOptions + "\n" + " " * margin
  
--- 293,306 ----
        width = 78 - margin
        pos = 0
  
!       if len(descriptors[optionKey]) > maxLength:
          dispOptions += "\n  %s\n%s" % (descriptors[optionKey], " " * margin)
!       else:
!         dispOptions += "\n  %s  %s" % (descriptors[optionKey],
                 " " * (maxLength - len(descriptors[optionKey])))
  
!       for word in string.split(allOptions[optionKey][6]):
!         if (len(word) + pos) > width:
            pos = 0
            dispOptions = dispOptions + "\n" + " " * margin
  
***************
*** 298,306 ****
        dispOptions = dispOptions + "\n"
  
      self.printVersion()
!     print _("Usage:  %s\n\n%s\n\nAvailable command line options:\n%s") % \
!        (self.USAGE, self.SUMMARY, dispOptions)
!     print _("Report bugs to address@hidden")
  
  
    #
--- 311,472 ----
        dispOptions = dispOptions + "\n"
  
      self.printVersion()
!     print _("Usage:  %s %s\n\n%s\n\nAvailable command line options:\n%s") % \
!        (self.COMMAND, self.USAGE, self.SUMMARY, dispOptions)
!     print _("%s\n" % self.REPORT_BUGS_TO)
! 
! 
!   #
!   #  Create a man page for this utility.
!   #
!   def dumpManPage(self):
!     import time
!     year = time.strftime("%Y", time.localtime(time.time()))
! 
! 
!     dest = open("%s.1" % self.COMMAND,"w")
! 
!     COMMAND = string.replace(self.COMMAND,'-','\-')
! 
!     #
!     # HEADER + NAME Sections
!     #
!     dest.write ("""\
! .ig
! Copyright (C) 2000-%s Free Software Foundation, Inc.
! 
! Permission is granted to make and distribute verbatim copies of
! this manual provided the copyright notice and this permission notice
! are preserved on all copies.
! 
! Permission is granted to copy and distribute modified versions of this
! manual under the conditions for verbatim copying, provided that the
! entire resulting derived work is distributed under the terms of a
! permission notice identical to this one.
! 
! Permission is granted to copy and distribute translations of this
! manual into another language, under the above conditions for modified
! versions, except that this permission notice may be included in
! translations approved by the Free Software Foundation instead of in
! the original English.
! ..
! """ % year)
! 
!     dest.write('.TH %s 1 "%s" "%s"\n' % (
!             string.upper(COMMAND),
!             time.strftime("%d %B %Y",
!                           time.localtime(time.time())),
!             self.NAME))
!     dest.write('.SH NAME\n')
!     dest.write('%s \- %s\n' % (COMMAND,
!                                string.replace(self.NAME,'-','\-')))
! 
! 
!     #
!     # SYNOPSIS Section
!     #
!     dest.write('.SH SYNOPSIS\n')
!     dest.write('.ll +8\n')
!     dest.write('.B %s\n' % COMMAND)
!     for p in string.split(self.USAGE):
!       part = p
!       if part[0] == '[' and part[-1] == ']':
!         pre = '[\n.I '
!         post = '\n]'
!         part = part[1:-1]
!       else:
!         pre = '.I '
!         post = ''
! 
!       if part == '...':
!         part = '\&...'
! 
!       if string.find(part,'=') > 0:
!         first, last = string.split(part,'=',2)
!         part = string.replace(part,
!              '=','\n=\n.I ',1)
! 
!       dest.write('%s%s%s\n' % (pre, part, post))
! 
! 
!     #
!     # DESCRIPTION Section
!     #
!     dest.write('.SH DESCRIPTION\n')
!     dest.write(lineWrap(string.replace(self.SUMMARY,'-','\-'),70) + '\n')
! 
! 
!     #
!     # OPTIONS Section
!     #
!     dest.write('.SH OPTIONS\n')
! 
!     allOptions = {}
!     descriptors = {}
!     for optionset in [self._base_options, self.COMMAND_OPTIONS]:
!       for option in optionset:
!         allOptions[string.upper(option[2])] = option
! 
!         if option[5]:
!           descr = '.B \-\-%s <%s>' % (option[2], option[5])
!         else:
!           descr = '.B \-\-%s' % (option[2])
!         if option[1]:
!           descr += ', \-%s' % option[1]
! 
!         descriptors[string.upper(option[2])] = descr
! 
! 
!     sorted = allOptions.keys()
!     sorted.sort()
! 
!     dispOptions = ""
! 
!     for optionKey in sorted:
!       dest.write(".TP\n%s\n" % (descriptors[optionKey]))
!       dest.write(string.replace(string.replace(
!                lineWrap(
!                string.replace(allOptions[optionKey][6],'-','\-'),70),
!                 "\n.", "\n\\."), "\n'", "\n\\'"))
! 
!     #
!     # AUTHOR, BUGS, and COPYRIGHT sections
!     #
!     dest.write("""\
! .SH AUTHOR
! %(AUTHOR)s <%(EMAIL)s>
! .SH BUGS
! %(BUGS)s
! Include a complete, self-contained example
! that will allow the bug to be reproduced,
! and say which version of this tool you are using.
! .SH COPYRIGHT
! Copyright \(co 2000-%(YEAR)s Free Software Foundation, Inc.
! .LP
! %(COMMAND)s is free software; you can redistribute it and/or modify it under
! the terms of the GNU General Public License as published by the Free
! Software Foundation; either version 2, or (at your option) any later
! version.
! .LP
! %(COMMAND)s is distributed in the hope that it will be useful, but WITHOUT ANY
! WARRANTY; without even the implied warranty of MERCHANTABILITY or
! FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
! for more details.
! .LP
! You should have received a copy of the GNU General Public License along
! with %(COMMAND)s; see the file COPYING.  If not, write to the Free Software
! Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! """ % {'COMMAND': COMMAND,
!        'YEAR': year,
!        'BUGS': self.REPORT_BUGS_TO,
!        'AUTHOR': self.AUTHOR,
!        'EMAIL': self.EMAIL})
! 
!     #
!     # Cleanup
!     #
!     dest.close()
!     print "Man file create: %s.1" % self.COMMAND
  
  
    #
***************
*** 308,327 ****
    #  how to get help
    #
    def handleStartupError(self, msg):
!       self.printVersion()
  
-       # if msg is multiline, then surround with dashes to set it apart
-       if string.find("%s" % msg, "\n") + 1:
-         print '-' * 60
-       print _("Error: %s") % msg
-       if string.find("%s" % msg, "\n") + 1:
-         print '-' * 60
-       print _("\nFor help, type:\n   %s --help\n") % (self.COMMAND)
-       sys.exit()
  
    #
    # Used when interactive debugger in use
!   # 
    def _debugger(self):
  
      import pdb
--- 474,494 ----
    #  how to get help
    #
    def handleStartupError(self, msg):
!     self.printVersion()
! 
!     # if msg is multiline, then surround with dashes to set it apart
!     if string.find("%s" % msg, "\n") + 1:
!       print '-' * 60
!     print _("Error: %s") % msg
!     if string.find("%s" % msg, "\n") + 1:
!       print '-' * 60
!     print _("\nFor help, type:\n   %s --help\n") % (self.COMMAND)
!     sys.exit()
  
  
    #
    # Used when interactive debugger in use
!   #
    def _debugger(self):
  
      import pdb
Index: gnue/designer/MANIFEST.in
diff -c gnue/designer/MANIFEST.in:1.4 gnue/designer/MANIFEST.in:1.5
*** gnue/designer/MANIFEST.in:1.4       Tue Nov 20 23:44:47 2001
--- gnue/designer/MANIFEST.in   Sun Jun  2 18:21:41 2002
***************
*** 11,14 ****
  
  include client/gfdesigner.in
  include setup.cfg.in
! recursive-include doc *.txt *.pdf
\ No newline at end of file
--- 11,14 ----
  
  include client/gfdesigner.in
  include setup.cfg.in
! recursive-include doc *.txt *.pdfinclude man/*.1
Index: gnue/designer/setup.py
diff -c gnue/designer/setup.py:1.29 gnue/designer/setup.py:1.30
*** gnue/designer/setup.py:1.29 Sat Jun  1 13:47:34 2002
--- gnue/designer/setup.py      Sun Jun  2 18:21:41 2002
***************
*** 65,70 ****
--- 65,83 ----
  lyx --export pdf DevelopersGuide-Forms.lyx
  """)
  
+ 
+   print "Now, we are going to create the man pages for our tools."
+   os.system( """
+ if [ ! -e man ]
+ then
+ mkdir man
+ fi
+ cd man
+ ../client/gfdes --generate-man-page
+ """)
+ 
+ 
+ 
  if 'build' in sys.argv:
  #  # Verify that PyXML is installed
  #  try:
***************
*** 176,184 ****
  
        fin.close()
        fout.close()
!           
!   
!               
  docfiles = []
  for file in ('doc/DevelopersGuide-Forms.txt',
               'doc/DevelopersGuide-Forms.pdf'):
--- 189,197 ----
  
        fin.close()
        fout.close()
! 
! 
! 
  docfiles = []
  for file in ('doc/DevelopersGuide-Forms.txt',
               'doc/DevelopersGuide-Forms.pdf'):
***************
*** 187,192 ****
--- 200,211 ----
    else:
      print "WARNING: File %s does not exist... not installing!" % file
  
+ manfiles = []
+ for file in ('man/gfdesigner.1',):
+   if os.path.isfile(file):
+     manfiles.append(file)
+   else:
+     print "WARNING: File %s does not exist... not installing!" % file
  
  
  #
***************
*** 213,219 ****
         url = "http://www.gnue.org";,
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
!        data_files = [ ('doc/designer',docfiles) ],
         packages = ["gnue.designer",
                     "gnue.designer.forms",
                     "gnue.designer.forms.LayoutEditor",
--- 232,239 ----
         url = "http://www.gnue.org";,
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
!        data_files = [ ('doc/designer', docfiles),
!                       ('man', manfiles) ],
         packages = ["gnue.designer",
                     "gnue.designer.forms",
                     "gnue.designer.forms.LayoutEditor",
Index: gnue/designer/src/Designer.py
diff -c gnue/designer/src/Designer.py:1.39 gnue/designer/src/Designer.py:1.40
*** gnue/designer/src/Designer.py:1.39  Tue May 14 21:27:08 2002
--- gnue/designer/src/Designer.py       Sun Jun  2 18:21:41 2002
***************
*** 1,6 ****
  #
- # Copyright 2001 Free Software Foundation
- #
  # This file is part of GNU Enterprise.
  #
  # GNU Enterprise is free software; you can redistribute it
--- 1,4 ----
***************
*** 18,23 ****
--- 16,23 ----
  # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
+ # Copyright 2001-2002 Free Software Foundation
+ #
  # FILE:
  # GFDesigner.py
  #
***************
*** 79,87 ****
    # GClientApp stuff...
    NAME = PACKAGE
    VERSION = VERSION
!   COMMAND = "gdes"
    SUMMARY = "A graphical tool for the rapid deployment of GNU Enterprise 
forms and reports."
!   USAGE = "gdes [options] [files]"
  
    def __init__(self):
      self.mru = MRUManager.MRUManager(self)
--- 79,87 ----
    # GClientApp stuff...
    NAME = PACKAGE
    VERSION = VERSION
!   COMMAND = "gfdesigner"
    SUMMARY = "A graphical tool for the rapid deployment of GNU Enterprise 
forms and reports."
!   USAGE = GClientApp.USAGE + " [file] [file] ..."
  
    def __init__(self):
      self.mru = MRUManager.MRUManager(self)
Index: gnue/forms/MANIFEST.in
diff -c gnue/forms/MANIFEST.in:1.12 gnue/forms/MANIFEST.in:1.13
*** gnue/forms/MANIFEST.in:1.12 Tue Nov 20 23:44:48 2001
--- gnue/forms/MANIFEST.in      Sun Jun  2 18:21:42 2002
***************
*** 13,15 ****
--- 13,16 ----
  recursive-include samples *
  recursive-include setupext *
  recursive-include doc *.txt *.pdf
+ include man/*.1
Index: gnue/forms/setup.py
diff -c gnue/forms/setup.py:1.66 gnue/forms/setup.py:1.67
*** gnue/forms/setup.py:1.66    Sat Jun  1 13:47:34 2002
--- gnue/forms/setup.py Sun Jun  2 18:21:42 2002
***************
*** 79,84 ****
--- 79,98 ----
  lyx --export text user_guide.lyx
  lyx --export pdf user_guide.lyx
  """)
+ 
+ 
+   print "Now, we are going to create the man pages for our tools."
+   os.system( """
+ if [ ! -e man ]
+ then
+ mkdir man
+ fi
+ cd man
+ ../client/gfcvs --generate-man-page
+ """)
+ 
+ 
+ 
  if ('build' in sys.argv) or ('install' in sys.argv):
    # Verify that gnue-common is installed
  #  try:
***************
*** 132,137 ****
--- 146,153 ----
    except ImportError:
      print "No"
  
+   # We have no reliable way of verifying the above!
+   UIOK = 1
  
    if UIOK != 1:
      print """
***************
*** 230,235 ****
--- 246,259 ----
    else:
      print "WARNING: File %s does not exist... not installing!" % file
  
+ manfiles = []
+ for file in ('man/gfclient.1',):
+   if os.path.isfile(file):
+     manfiles.append(file)
+   else:
+     print "WARNING: File %s does not exist... not installing!" % file
+ 
+ 
  #
  # You can run:
  #   $ GNUE_VERSION_SUFFIX=-pre1 ./setup.py sdist
***************
*** 251,257 ****
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
  
!        data_files = [ ('doc/forms', docfiles) ],
  
         packages = ["gnue.forms",
                     "gnue.forms.GFObjects",
--- 275,282 ----
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
  
!        data_files = [ ('doc/forms', docfiles),
!                       ('man', manfiles) ],
  
         packages = ["gnue.forms",
                     "gnue.forms.GFObjects",
Index: gnue/forms/src/GFClient.py
diff -c gnue/forms/src/GFClient.py:1.41 gnue/forms/src/GFClient.py:1.42
*** gnue/forms/src/GFClient.py:1.41     Tue May  7 12:46:01 2002
--- gnue/forms/src/GFClient.py  Sun Jun  2 18:21:42 2002
***************
*** 1,6 ****
  #
- # Copyright 2000, 2001 Free Software Foundation
- #
  # This file is part of GNU Enterprise.
  #
  # GNU Enterprise is free software; you can redistribute it
--- 1,4 ----
***************
*** 18,23 ****
--- 16,23 ----
  # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
+ # Copyright 2000, 2001 Free Software Foundation
+ #
  # FILE:
  # GFClient.py
  #
***************
*** 53,61 ****
    VERSION = VERSION
    COMMAND = "gfclient"
    NAME = "GNUe Forms"
!   USAGE = "gfclient [options] file" 
    COMMAND_OPTIONS = [
!       [ 'user_interface', 'u', 'user_interface', 1, 'wx', 'type',  
            _('The currently supported values for <type> are ') \
            +'wx(GUI), nttsi(curses)' ],
        [ 'splash_screen','s','no_splash', 0, None, None,
--- 53,61 ----
    VERSION = VERSION
    COMMAND = "gfclient"
    NAME = "GNUe Forms"
!   USAGE = GClientApp.USAGE + " file"
    COMMAND_OPTIONS = [
!       [ 'user_interface', 'u', 'user_interface', 1, 'wx', 'type',
            _('The currently supported values for <type> are ') \
            +'wx(GUI), nttsi(curses)' ],
        [ 'splash_screen','s','no_splash', 0, None, None,
Index: gnue/navigator/src/GNClient.py
diff -c gnue/navigator/src/GNClient.py:1.6 gnue/navigator/src/GNClient.py:1.7
*** gnue/navigator/src/GNClient.py:1.6  Sat May  4 12:45:08 2002
--- gnue/navigator/src/GNClient.py      Sun Jun  2 18:21:42 2002
***************
*** 1,6 ****
  #
- # Copyright 2002 Free Software Foundation
- #
  # This file is part of GNU Enterprise.
  #
  # GNU Enterprise is free software; you can redistribute it
--- 1,4 ----
***************
*** 17,22 ****
--- 15,22 ----
  # License along with program; see the file COPYING. If not,
  # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2002 Free Software Foundation
  #
  # FILE:
  # GNClient.py
Index: gnue/reports/MANIFEST.in
diff -c gnue/reports/MANIFEST.in:1.1 gnue/reports/MANIFEST.in:1.2
*** gnue/reports/MANIFEST.in:1.1        Sat Jun  1 13:47:34 2002
--- gnue/reports/MANIFEST.in    Sun Jun  2 18:21:42 2002
***************
*** 15,17 ****
--- 15,18 ----
  recursive-include doc *.txt *.pdf
  recursive-include filters *
  recursive-include adapters *
+ include man/*.1
Index: gnue/reports/setup.py
diff -c gnue/reports/setup.py:1.10 gnue/reports/setup.py:1.11
*** gnue/reports/setup.py:1.10  Sat Jun  1 13:47:34 2002
--- gnue/reports/setup.py       Sun Jun  2 18:21:42 2002
***************
*** 79,84 ****
--- 79,108 ----
  lyx --export pdf ReportingConcepts.lyx
  """)
  
+ 
+   print "Now, we are going to create the man pages for our tools."
+   os.system( """
+ if [ ! -e man ]
+ then
+ mkdir man
+ fi
+ cd man
+ ../client/grcvs --generate-man-page
+ #../client/grserve --generate-man-page
+ """)
+ 
+ 
+ # Site config stuff
+ try:
+   index = sys.argv.index('--cfg-file')
+   site_config = os.path.join(os.path.abspath(sys.argv[index+1]))
+   sys.argv.pop(index)
+   sys.argv.pop(index)
+   config_line = "os.environ['GNUE_INSTALLED_SITE_CFG']='%s'\n" % site_config
+ 
+ except ValueError:
+   config_line = ""
+ 
  #if ('build' in sys.argv) or ('install' in sys.argv):
  #  # Verify that gnue-common is installed
  #  try:
***************
*** 100,118 ****
  
  
  
- # Site config stuff
- try:
-   index = sys.argv.index('--cfg-file')
-   site_config = os.path.join(os.path.abspath(sys.argv[index+1]))
-   sys.argv.pop(index)
-   sys.argv.pop(index)
-   config_line = "os.environ['GNUE_INSTALLED_SITE_CFG']='%s'\n" % site_config
- 
- except ValueError:
-   config_line = ""
- 
- 
- 
  class my_build_scripts(build_scripts):
    def finalize_options(self):
  
--- 124,129 ----
***************
*** 179,184 ****
--- 190,213 ----
        fout.close()
        print "OK"
  
+ 
+ docfiles = []
+ for file in ('doc/ReportingConcepts.txt',
+              'doc/ReportingConcepts.pdf'):
+   if os.path.isfile(file):
+     docfiles.append(file)
+   else:
+     print "WARNING: File %s does not exist... not installing!" % file
+ 
+ manfiles = []
+ for file in ('man/grrun.1',
+              'man/grserve.1'):
+   if os.path.isfile(file):
+     manfiles.append(file)
+   else:
+     print "WARNING: File %s does not exist... not installing!" % file
+ 
+ 
  #
  # You can run:
  #   $ GNUE_VERSION_SUFFIX=-pre1 ./setup.py sdist
***************
*** 201,208 ****
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
  
!        data_files = [ ('doc/reports',['doc/ReportingConcepts.txt',
!                                       'doc/ReportingConcepts.pdf']),
                        ('shared/filters',['filters/README']),
                        ('shared/filters/SimpleTabulation', [
                                        'filters/SimpleTabulation/csv.xsl',
--- 230,237 ----
         # Override certain command classes with our own ones
         cmdclass = {'build_scripts':my_build_scripts},
  
!        data_files = [ ('doc/reports', docfiles),
!                       ('man', manfiles),
                        ('shared/filters',['filters/README']),
                        ('shared/filters/SimpleTabulation', [
                                        'filters/SimpleTabulation/csv.xsl',
Index: gnue/reports/src/GRRun.py
diff -c gnue/reports/src/GRRun.py:1.14 gnue/reports/src/GRRun.py:1.15
*** gnue/reports/src/GRRun.py:1.14      Sat May 11 19:52:30 2002
--- gnue/reports/src/GRRun.py   Sun Jun  2 18:21:42 2002
***************
*** 54,60 ****
    #
    # GClientApp() overrides
    #
!   VERSION = "0.0.1"
    COMMAND = "grrun"
    NAME = "GNUe Reports Client"
    COMMAND_OPTIONS = [
--- 54,60 ----
    #
    # GClientApp() overrides
    #
!   VERSION = VERSION
    COMMAND = "grrun"
    NAME = "GNUe Reports Client"
    COMMAND_OPTIONS = [
***************
*** 118,124 ****
            'A SECURITY RISK.' ] ]
    SUMMARY = \
       "GNUe Reports is the primary reporting agent of the GNU Enterprise 
system."
!   USAGE = GClientApp.USAGE % COMMAND + " [param1=val] [param2=val] [...]"
  
    #
    # Initialize the class
--- 118,124 ----
            'A SECURITY RISK.' ] ]
    SUMMARY = \
       "GNUe Reports is the primary reporting agent of the GNU Enterprise 
system."
!   USAGE = GClientApp.USAGE + " file [param1=val] [param2=val] ..."
  
    #
    # Initialize the class
Index: gnue/reports/src/GRServer.py
diff -c gnue/reports/src/GRServer.py:1.5 gnue/reports/src/GRServer.py:1.6
*** gnue/reports/src/GRServer.py:1.5    Sat May  4 12:45:09 2002
--- gnue/reports/src/GRServer.py        Sun Jun  2 18:21:42 2002
***************
*** 32,62 ****
  
  
  from gnue.common import GDebug
! from gnue.common.GClientApp import GClientApp 
  from GREngine import GREngine
  from GRConfig import ConfigOptions
  import GRExceptions
  import string, sys
  
  
  
! class GRServer (GServerApp): 
  
    #
!   # GClientApp() overrides
    #
!   VERSION = "0.0.1"
    COMMAND = "grserve"
    NAME = "GNUe Reports Server"
!   USAGE = "%s [options]" % COMMAND
    COMMAND_OPTIONS = [ ]
    SUMMARY = \
       "GNUe Reports is the primary reporting agent of the GNU Enterprise 
system."
  
!   # 
    # Initialize the class
    #
!   def __init__(self):    
      GServerApp.__init__(self,defaults=ConfigOptions)
  
  
--- 32,63 ----
  
  
  from gnue.common import GDebug
! from gnue.common.GClientApp import GClientApp
  from GREngine import GREngine
  from GRConfig import ConfigOptions
  import GRExceptions
  import string, sys
+ from gnue.reports import VERSION
  
  
  
! class GRServer (GServerApp):
  
    #
!   # GServerApp() overrides
    #
!   VERSION = VERSION
    COMMAND = "grserve"
    NAME = "GNUe Reports Server"
!   USAGE = GServerApp.USAGE
    COMMAND_OPTIONS = [ ]
    SUMMARY = \
       "GNUe Reports is the primary reporting agent of the GNU Enterprise 
system."
  
!   #
    # Initialize the class
    #
!   def __init__(self):
      GServerApp.__init__(self,defaults=ConfigOptions)
  
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]