[Subversion] / PEAK / setup.py  

Diff of /PEAK/setup.py

Parent Directory | Revision Log

version 1018, Thu Apr 24 18:05:13 2003 UTC version 2590, Sat Nov 1 03:09:58 2008 UTC
Line 1 
Line 1 
 #!/usr/bin/env python  #!/usr/bin/env python
   
 """Distutils setup file"""  """Distutils setup file"""
   
 execfile('src/setup/prologue.py')  import sys, os, ez_setup
   ez_setup.use_setuptools()
 include_tests = True        # edit this to stop installation of test modules  
 include_metamodels = True   # edit this to stop installation of MOF, UML, etc.  
   
   from setuptools import setup, Extension, Feature, find_packages
   
 # Metadata  # Metadata
   
 PACKAGE_NAME = "PEAK"  PACKAGE_NAME = "PEAK"
 PACKAGE_VERSION = "0.5a0"  PACKAGE_VERSION = "0.5a4"
   
 HAPPYDOC_IGNORE = [  HAPPYDOC_IGNORE = [
     '-i', 'examples',  '-i', 'old', '-i', 'tests',      '-i','old', '-i','tests', '-i','setup', '-i','examples',
 ]  ]
   
   
 # Base packages for installation  packages = find_packages('src')
   
 packages = [  
     'peak', 'peak.api', 'peak.binding', 'peak.config', 'peak.model',  
     'peak.naming', 'peak.naming.factories', 'peak.running',  
     'peak.storage', 'peak.util',  
 ]  
   
 extensions = [  extensions = [
     Extension("kjbuckets", ["src/kjbuckets/kjbucketsmodule.c"]),      Extension("peak.util.pyexpat", [
           "src/peak/util/pyexpat.c",
           "src/expat/xmlparse.c", "src/expat/xmltok.c", #"src/expat/xmltok_ns.c",
           "src/expat/xmlrole.c",], #"src/expat/xmltok_impl.c"],
           include_dirs=["src/expat"],
           define_macros=[('XML_STATIC',1),('HAVE_MEMMOVE',1)]   # XXX
       ),
     Extension(      Extension(
         "peak.binding._once", [          "peak.binding._once", [
             "src/peak/binding/_once" + EXT,              "src/peak/binding/_once.pyx", "src/peak/binding/getdict.c"
             "src/peak/binding/getdict.c"  
         ]          ]
     ),      ),
     Extension("peak.util.buffer_gap", ["src/peak/util/buffer_gap" + EXT]),      Extension("peak.util.buffer_gap", ["src/peak/util/buffer_gap.pyx"]),
     Extension("peak.util._Code", ["src/peak/util/_Code" + EXT]),      Extension("peak.util._Code", ["src/peak/util/_Code.pyx"]),
       Extension(
           "peak.persistence._persistence", ["src/peak/persistence/persistence.c"]
       ),
 ]  ]
   
   
 # Base data files  
   
 data_files = [  
     ('peak', ['src/peak/peak.ini']),  
 ]  
   
   have_uuidgen = False
   
 if include_tests:  if os.name=='posix' and hasattr(os, 'uname'):
   
     packages += [      un = os.uname()
         'peak.tests', 'peak.binding.tests', 'peak.config.tests',  
         'peak.model.tests', 'peak.naming.tests', 'peak.running.tests',  
         'peak.storage.tests', 'peak.util.tests',  
     ]  
   
     data_files += [  
         ('peak/running/tests', ['src/peak/running/tests/test_cluster.txt']),  
     ]  
   
       if un[0] == 'FreeBSD' and int(un[2].split('.')[0]) >= 5:
           have_uuidgen = True
   
 if include_metamodels:      elif un[0] == 'NetBSD' and int(un[2].split('.')[0]) >= 2:
           have_uuidgen = True
   
     packages += [      elif un[0] == 'NetBSD' and un[2].startswith('1.6Z'):
         'peak.metamodels',          # XXX for development versions before 2.x where uuidgen
         'peak.metamodels.UML13',          # is present -- this should be removed at some point
         'peak.metamodels.UML13.model',          try:
         'peak.metamodels.UML13.model.Foundation',              if len(un[2]) > 4:
         'peak.metamodels.UML13.model.Behavioral_Elements',                  if ord(un[2][4]) >= ord('I'):
     ]                      if os.path.exists('/lib/libc.so.12'):
                           l = os.listdir('/lib')
                           l = [x for x in l if x.startswith('libc.so.12.')]
                           l = [int(x.split('.')[-1]) for x in l]
                           l.sort(); l.reverse()
                           if l[0] >= 111:
                               have_uuidgen = True
           except:
               pass
   
     if include_tests:  
   
         packages += [ 'peak.metamodels.tests' ]  
   
         data_files += [  
             ('peak/metamodels/tests',  
                 ['src/peak/metamodels/tests/MetaMeta.xml']  
             ),  
         ]  
   
   
 try:  
     # Check if Zope X3 is installed; we use zope.component  
     # because we don't install it ourselves; if we used something we  
     # install, we'd get a false positive if PEAK was previously installed.  
     import zope.component  
     zope_installed = True  
   
 except ImportError:  
     zope_installed = False  
   
   
 if not zope_installed:  
   
     packages += [  
         'zope', 'zope.interface', 'zope.interface.common',  
         'persistence', 'ZConfig',  
     ]  
   
     extensions += [  
         Extension("persistence._persistence", ["src/persistence/persistence.c"])  
     ]  
   
     if include_tests:  
         packages += [  
             'zope.interface.tests', 'persistence.tests', 'ZConfig.tests',  
             'zope.interface.common.tests',  
         ]  
   
         data_files += findDataFiles('src/ZConfig/tests', 1, '*.xml', '*.txt', '*.conf')  
   
   
   
   execfile('src/setup/common.py')
   
   features = {
       'tests': Feature(
           "test modules", standard = True,
           remove = [p for p in packages if p.endswith('.tests')]
       ),
       'metamodels': Feature(
           "MOF/UML metamodels", standard = True, remove=['peak.metamodels']
       ),
       'uuidgen': Feature(
           "UUID generation via BSD system libraries",
           available = have_uuidgen, standard = have_uuidgen,
           optional = have_uuidgen,
           ext_modules = [
               Extension("peak.util._uuidgen", ["src/peak/util/_uuidgen.c"]),
           ]
       ),
       'pyexpat-plus': Feature(
           "Backport pyexpat features from Python 2.4",
           standard=sys.version_info < (2,4), optional = False,
           remove = ["peak.util.pyexpat"]
       ),
   }
   
   ALL_EXTS = [
       '*.ini', '*.html', '*.conf', '*.xml', '*.pwt', '*.dtd', '*.txt',
   ]
   
   
   
Line 121 
Line 115 
   
   
   
 import os  
   
 if os.name=='posix':  
   
     # install 'peak' script on Unix-like OS's (including cygwin)  
     scripts = ['scripts/peak']  
   
 else:  
     # Nothing to see here, move along...  
     scripts = []  
   
   
 execfile('src/setup/common.py')  
   
 setup(  setup(
     name=PACKAGE_NAME,      name=PACKAGE_NAME,
     version=PACKAGE_VERSION,      version=PACKAGE_VERSION,
   
     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="peak@eby-sarna.com",
   
     url="http://peak.telecommunity.com/",      url="http://peak.telecommunity.com/",
       download_url="http://peak.telecommunity.com/snapshots/",
     license="PSF or ZPL",      license="PSF or ZPL",
     platforms=['UNIX','Windows'],      platforms=['UNIX','Windows'],
   
     packages    = packages,  
     package_dir = {'':'src'},      package_dir = {'':'src'},
       packages    = packages,
     cmdclass = SETUP_COMMANDS,      cmdclass = SETUP_COMMANDS,
   
     data_files = data_files,      install_requires = [
           'RuleDispatch >= 0.5a0dev-r2287', 'PyProtocols  >= 1.0a0dev-r2287',
           'Importing    >= 1.9',            'SymbolType   >= 1.0',
           'wsgiref      >= 0.0.1dev',       'ZConfig      >  2.0',
           'DecoratorTools>=1.6',            'CLI-Tools    >= 0.5dev',
       ],
   
       extras_require = {
           'FastCGI': ['fcgiapp >= 1.4'],
       },
   
       package_data = {
           '': ALL_EXTS,
           'peak.metamodels': ['*.asdl']
       },
   
       features = features,
       test_suite = 'peak.tests.test_suite',
     ext_modules = extensions,      ext_modules = extensions,
     scripts = scripts,  
 )  
   
       entry_points = {
           "console_scripts":["peak = peak.running.commands:__main__"]
       },
       zip_safe=sys.version>='2.3.5',
   
   
       long_description = """\
   PEAK is an application kit, and applications are made from components.
   PEAK provides you with a component architecture, component infrastructure,
   and various general-purpose components and component frameworks for
   building applications.  As with J2EE, the idea is to let you stop
   reinventing architectural and infrastructure wheels, so you can put more
   time into your actual application.
   
   Development version: svn://svn.eby-sarna.com/svnroot/PEAK#egg=PEAK-dev
   """,
   
       keywords = "Enterprise,SQL,LDAP,UML,XMI,JNDI,persistence,AOP,FastCGI,MOF,event-driven,twisted,web",
   
       classifiers = """
       Development Status :: 3 - Alpha
       Development Status :: 4 - Beta
       Environment :: Console
       Environment :: No Input/Output (Daemon)
       Environment :: Web Environment
       Environment :: Win32 (MS Windows)
       Intended Audience :: Developers
       License :: OSI Approved :: BSD License
       License :: OSI Approved :: Python Software Foundation License
       License :: OSI Approved :: Zope Public License
       Natural Language :: English
       Operating System :: Microsoft :: Windows
       Operating System :: POSIX
       Programming Language :: C
       Programming Language :: Python
       Topic :: Database :: Front-Ends
       Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
       Topic :: Office/Business
       Topic :: Software Development :: Code Generators
       Topic :: Software Development :: Libraries :: Application Frameworks
       Topic :: Software Development :: Libraries :: Python Modules
       Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP
       Topic :: Text Processing :: Markup :: XML""".strip().splitlines(),
   
       dependency_links = ['http://peak.telecommunity.com/snapshots/']
   )
   


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

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help