[Subversion] / PEAK / setup.py  

View of /PEAK/setup.py

Parent Directory | Revision Log
Revision: 1018 - (download) (as text)
Thu Apr 24 18:05:13 2003 UTC (21 years ago) by pje
File size: 3386 byte(s)
Semi-final draft of the 'peak.running.commands' framework.  It's now
possible to bootstrap almost anything to run as a PEAK command object;
see 'running.IExecutable'.  Added new 'peak' script (Posix-like OSes and
Cygwin only) that can bootstrap execution of any URL or .ini-defined
shortcut.  Moved CGI/FastCGI publishing command objects to
'peak.running.zpublish', since they aren't useful without the ZPublisher
stuff anyway.  Added "usage" capabilities for commands to display usage
help and to be able to distinguish invocation errors from execution errors.

Note: the diffs for this are going to suck from a readability POV, because
diff doesn't deal well with the removal of a huge block of code in the same
revision as significant doc rewrites or refactoring within classes.  :(
#!/usr/bin/env python

"""Distutils setup file"""

execfile('src/setup/prologue.py')

include_tests = True        # edit this to stop installation of test modules
include_metamodels = True   # edit this to stop installation of MOF, UML, etc.


# Metadata

PACKAGE_NAME = "PEAK"
PACKAGE_VERSION = "0.5a0"

HAPPYDOC_IGNORE = [
    '-i', 'examples',  '-i', 'old', '-i', 'tests',
]


# 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',
]

extensions = [
    Extension("kjbuckets", ["src/kjbuckets/kjbucketsmodule.c"]),
    Extension(
        "peak.binding._once", [
            "src/peak/binding/_once" + EXT,
            "src/peak/binding/getdict.c"
        ]
    ),
    Extension("peak.util.buffer_gap", ["src/peak/util/buffer_gap" + EXT]),
    Extension("peak.util._Code", ["src/peak/util/_Code" + EXT]),
]


# 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',
    ]

    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']
            ),
        ]


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')












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(
    name=PACKAGE_NAME,
    version=PACKAGE_VERSION,

    description="The Python Enterprise Application Kit",

    author="Phillip J. Eby",
    author_email="transwarp@eby-sarna.com",

    url="http://peak.telecommunity.com/",

    license="PSF or ZPL",
    platforms=['UNIX','Windows'],

    packages    = packages,
    package_dir = {'':'src'},

    cmdclass = SETUP_COMMANDS,

    data_files = data_files,
    ext_modules = extensions,
    scripts = scripts,
)



cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help