/[gnue]/gnue-appserver/setup.py
ViewVC logotype

Diff of /gnue-appserver/setup.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by btami, Fri Sep 19 21:17:38 2003 UTC revision 1.23 by reinhard, Mon Sep 22 19:09:11 2003 UTC
# Line 29  import os Line 29  import os
29  import copy  import copy
30    
31  from distutils.core import setup  from distutils.core import setup
32  from distutils.command.build_scripts import build_scripts  from distutils.command.build import build
33  from distutils.command.install import install  from distutils.command.install import install
34    
35  from src import PACKAGE, VERSION  from src import PACKAGE, VERSION
# Line 62  if "install" in sys.argv or "bdist_rpm" Line 62  if "install" in sys.argv or "bdist_rpm"
62        pass        pass
63    
64  # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
65  # sdist (Source distribution): build documentation, SQL scripts and manpage  # Build files to be distributed and installed
66  # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
67    
68  if "sdist" in sys.argv:  def build_files ():
69    
70    # First check if we have everything installed we need to build the    # First check if we have everything installed we need to build the
71    # distribution    # distribution
72    
# Line 127  if "sdist" in sys.argv: Line 128  if "sdist" in sys.argv:
128      sys.exit (1)      sys.exit (1)
129    
130  # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
131    # Source distribution: Build files to be distributed
132    # -----------------------------------------------------------------------------
133    
134    if "sdist" in sys.argv:
135      build_files ()
136    
137    # -----------------------------------------------------------------------------
138  # User can supply a path to the config file  # User can supply a path to the config file
139  # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
140    
# Line 140  except ValueError: Line 148  except ValueError:
148    config_line = ""    config_line = ""
149    
150  # =============================================================================  # =============================================================================
151    # Before build: if done from CVS, build files to be installed
152    # =============================================================================
153    
154    class gnue_build (build):
155    
156      def finalize_options (self):
157        build.finalize_options (self)
158        if self.finalized:
159          return
160    
161        if not os.path.isfile ("PKG-INFO"):         # downloaded from CVS?
162          build_files ()
163    
164    # =============================================================================
165  # Before installation: check dependencies and create real scripts  # Before installation: check dependencies and create real scripts
166  # =============================================================================  # =============================================================================
167    
168  class my_install (install):  class gnue_install (install):
169    
170    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
171    # Check dependencies    # Check dependencies
# Line 324  except KeyError: Line 346  except KeyError:
346  # Call the actual setup routine  # Call the actual setup routine
347  # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
348    
349    datafiles = ["src/classrep/repository.ini"]
350    
351    grpcfiles = ["grpc/appserver.grpc"]
352    
353  manfiles = []  manfiles = []
354  for file in ("man/gnue-appserver.1",):  for file in ("man/gnue-appserver.1",):
355    if os.path.isfile(file):    if os.path.isfile(file):
# Line 350  for file in ("samples/sample.gfd", "samp Line 376  for file in ("samples/sample.gfd", "samp
376    else:    else:
377      print "WARNING: File %s does not exist... not installing!" % file      print "WARNING: File %s does not exist... not installing!" % file
378    
 grpcfiles = ["grpc/appserver.grpc"]  
   
 datafiles = ["src/classrep/repository.ini"]  
   
379  setup (name = "GNUe-AppServer",  setup (name = "GNUe-AppServer",
380         version = VERSION + suffix,         version = VERSION + suffix,
381         description = "GNU Enterprise Application Server",         description = "GNU Enterprise Application Server",
# Line 364  setup (name = "GNUe-AppServer", Line 386  setup (name = "GNUe-AppServer",
386         license = "GPL",         license = "GPL",
387    
388         # Override certain command classes with our own ones         # Override certain command classes with our own ones
389         cmdclass = {"install": my_install},         cmdclass = {"build": gnue_build,
390                       "install": gnue_install},
391    
392         data_files = [ ("share/man/man1",                   manfiles),         data_files = [("share/gnue-appserver",             datafiles),
393                        ("share/doc/gnue-appserver",         docfiles),                       ("shared/grpc",                      grpcfiles),
394                        ("share/doc/gnue-appserver/samples", samplefiles),                       ("share/man/man1",                   manfiles),
395                        ("shared/grpc",                      grpcfiles),                       ("share/doc/gnue-appserver",         docfiles),
396                        ("share/gnue-appserver",             datafiles)                       ("share/doc/gnue-appserver/samples", samplefiles)],
                        ],  
397    
398         packages = ["gnue.appserver",         packages = ["gnue.appserver",
399                     "gnue.appserver.classrep",                     "gnue.appserver.classrep",

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26