[Subversion] / PEAK / setup.py  

Diff of /PEAK/setup.py

Parent Directory | Revision Log

version 582, Thu Oct 31 02:08:38 2002 UTC version 966, Sat Apr 5 20:44:59 2003 UTC
Line 2 
Line 2 
   
 """Distutils setup file"""  """Distutils setup file"""
   
   include_tests = True        # edit this to stop installation of test modules
   include_metamodels = True   # edit this to stop installation of MOF, UML, etc.
   
   
   # Base packages for installation
   
   packages = [
       'peak', 'peak.api', 'peak.binding', 'peak.config', 'peak.model',
       'peak.naming', 'peak.naming.factories', 'peak.running',
       'peak.storage', 'peak.util',
   
       'Interface', 'Interface.Common', 'Interface.Registry',
       'Persistence',
   ]
   
   
   # Base data files
   
   data_files = [
       ('peak', ['src/peak/peak.ini']),
   ]
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   if include_tests:
   
       packages += [
           'peak.tests', 'peak.binding.tests', 'peak.config.tests',
           'peak.model.tests', 'peak.naming.tests', 'peak.running.tests',
           'peak.storage.tests', 'peak.util.tests',
   
           'Interface.tests', 'Interface.Common.tests',
           'Interface.Registry.tests',
       ]
   
       data_files += [
           ('peak/running/tests', ['src/peak/running/tests/test_cluster.txt']),
       ]
   
   
   if include_metamodels:
   
       packages += [
           'peak.metamodels',
           'peak.metamodels.UML13',
           'peak.metamodels.UML13.model',
           'peak.metamodels.UML13.model.Foundation',
           'peak.metamodels.UML13.model.Behavioral_Elements',
       ]
   
       if include_tests:
   
           packages += [
               'peak.metamodels.tests',
           ]
   
           data_files += [
               ('peak/metamodels/tests',
                   ['src/peak/metamodels/tests/MetaMeta.xml']
               ),
           ]
   
   
   
   
 from distutils.core import setup, Command, Extension  from distutils.core import setup, Command, Extension
 from distutils.command.install_data import install_data  from distutils.command.install_data import install_data
 from distutils.command.sdist import sdist as old_sdist  from distutils.command.sdist import sdist as old_sdist
   from distutils.command.build_ext import build_ext as old_build_ext
 import sys  import sys
   
   try:
       from Pyrex.Distutils.build_ext import build_ext
       EXT = '.pyx'
   except ImportError:
       build_ext = old_build_ext
       EXT = '.c'
   
   
 class install_data(install_data):  class install_data(install_data):
   
     """Variant of 'install_data' that installs data to module directories"""      """Variant of 'install_data' that installs data to module directories"""
Line 23 
Line 110 
     """Variant of 'sdist' that (re)builds the documentation first"""      """Variant of 'sdist' that (re)builds the documentation first"""
   
     def run(self):      def run(self):
   
         # Build docs before source distribution          # Build docs before source distribution
           try:
               import happydoclib
           except ImportError:
               pass
           else:
         self.run_command('happy')          self.run_command('happy')
   
         # Run the standard sdist command          # Run the standard sdist command
         old_sdist.run(self)          old_sdist.run(self)
   
   
   
   
   
   
   
   
   
   
 class test(Command):  class test(Command):
   
     """Command to run unit tests after installation"""      """Command to run unit tests after installation"""
Line 92 
Line 174 
   
     user_options = []      user_options = []
   
   
     def initialize_options(self):      def initialize_options(self):
         self.happy_options = None          self.happy_options = None
         self.doc_output_path = None          self.doc_output_path = None
Line 107 
Line 188 
             self.happy_options = [              self.happy_options = [
                 '-t', 'PEAK Reference', '-d', self.doc_output_path,                  '-t', 'PEAK Reference', '-d', self.doc_output_path,
                 '-i', 'examples', '-i', 'old', '-i', 'tests',                  '-i', 'examples', '-i', 'old', '-i', 'tests',
                 '-i', 'Interface', '-i', 'Persistence', '-i', 'kjbuckets', '.'                  '-i', 'Interface', '-i', 'Persistence',
                   '-i', 'kjbuckets', '.'
             ]              ]
             if not self.verbose: self.happy_options.insert(0,'-q')              if not self.verbose: self.happy_options.insert(0,'-q')
   
Line 123 
Line 205 
   
 setup(  setup(
     name="PEAK",      name="PEAK",
     version="0.5a1",      version="0.5a0",
   
     description="The Python Enterprise Application Kit",      description="The Python Enterprise Application Kit",
   
     author="Phillip J. Eby",      author="Phillip J. Eby",
     author_email="transwarp@eby-sarna.com",      author_email="transwarp@eby-sarna.com",
   
     url="http://www.telecommunity.com/PEAK/",      url="http://www.telecommunity.com/PEAK/",
   
     packages=[      license="PSF or ZPL",
         'peak', 'peak.api', 'peak.binding', 'peak.model', 'peak.metamodels',      platforms=['UNIX','Windows'],
         'peak.metamodels.mof', 'peak.metamodels.uml', 'peak.metamodels.xmi',  
         'peak.naming', 'peak.naming.factories', 'peak.util', 'peak.running',  
         'peak.config', 'peak.storage',  
   
         'peak.binding.tests', 'peak.config.tests',  
         'peak.metamodels.tests', 'peak.util.tests', 'peak.tests',  
   
         'Interface', 'Interface.tests',  
         'Interface.Common', 'Interface.Common.tests',  
         'Interface.Registry', 'Interface.Registry.tests',  
   
         'Persistence',      packages    = packages,
     ],  
     package_dir = {'':'src'},      package_dir = {'':'src'},
   
       cmdclass = {
           'install_data': install_data, 'sdist': sdist, 'happy': happy,
           'test': test, 'sdist_nodoc': old_sdist, 'build_ext': build_ext,
       },
   
       data_files = data_files,
   
     ext_modules = [      ext_modules = [
         Extension("kjbuckets", ["src/kjbuckets/kjbucketsmodule.c"]),          Extension("kjbuckets", ["src/kjbuckets/kjbucketsmodule.c"]),
         Extension("Persistence.cPersistence",          Extension("Persistence.cPersistence",
             ["src/Persistence/cPersistence.c"]              ["src/Persistence/cPersistence.c"]
         )          ),
     ],          Extension(
     cmdclass = {              "peak.binding._once", [
         'install_data': install_data, 'sdist': sdist, 'happy': happy,                  "src/peak/binding/_once" + EXT,
         'test': test, 'sdist_nodoc': old_sdist,                  "src/peak/binding/getdict.c"
     },              ]
     data_files = [          ),
         ('peak', ['src/peak/peak.ini']),          Extension("peak.util.buffer_gap", ["src/peak/util/buffer_gap" + EXT]),
         ('peak/metamodels/tests', ['src/peak/metamodels/tests/MetaMeta.xml']),          Extension("peak.util._Code", ["src/peak/util/_Code" + EXT]),
     ],      ],
   
 )  )
   
   


Generate output suitable for use with a patch program
Legend:
Removed from v.582  
changed lines
  Added in v.966

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help