[Zope-dev] Distutils scripts for ZODB
A.M. Kuchling
akuchlin@mems-exchange.org
Thu, 15 Jun 2000 22:01:07 -0400
Here are 3 short setup.py scripts for various bits of Zope. Two of them
don't fully work yet due to bugs in the current CVS of distutils;
the problems have been reported and should be fixed in a day or two.
'XXX' marks fields that I didn't fill in.
First, lib/python/setup.py; currently this just installs zLOG.py:
# Setup file for zLOG
from distutils.core import setup
setup(name = "zLOG",
version = "XXX",
description = "XXX",
author = "Jim Fulton",
author_email = "XXX",
url = "XXX",
py_modules = ['zLOG']
)
Second, lib/Components/ExtensionClass. I'm not sure which of the
modules actually need to be installed. ExtensionClass.h gets
installed in the wrong place (/usr/include/python/1.6 instead of
.../python1.6); this is one of the reported bugs.
# Setup file for ExtensionClass
from distutils.core import setup
from distutils.extension import Extension
# XXX which of these should really be installed?
ExtensionClass = Extension(name = 'ExtensionClass',
sources= ['ExtensionClass.c']
)
Acquisition = Extension(name = 'Acquisition',
sources = ['Acquisition.c'])
MethodObject = Extension(name = 'MethodObject',
sources = ['MethodObject.c'])
Missing = Extension(name = 'Missing', sources=['Missing.c'] )
MultiMapping = Extension(name = 'MultiMapping', sources=['MultiMapping.c'] )
ThreadLock = Extension(name = 'ThreadLock', sources=['ThreadLock.c'] )
setup(name = "ExtensionClass",
version = "XXX",
description = "XXX",
author = "Jim Fulton",
author_email = "XXX",
url = "XXX",
ext_modules = [ExtensionClass, Acquisition, MethodObject,
Missing, MultiMapping, ThreadLock],
headers = ["ExtensionClass.h"]
)
Finally, lib/python/ZODB/setup.py. The define_macros setting doesn't
work either, the second bug.
# Setup file for ZODB package
from distutils.core import setup
from distutils.extension import Extension
# XXX which of these should really be installed?
cPersistence = Extension(name = 'ZODB.cPersistence',
include_dirs=['../ExtensionClass/'],
sources= ['cPersistence.c']
)
cPickleCache = Extension(name = 'ZODB.cPickleCache',
include_dirs=['../ExtensionClass/'],
sources= ['cPickleCache.c']
)
TimeStamp = Extension(name = 'ZODB.TimeStamp',
# XXX define_macros doesn't currently work
define_macros = ['USE_EXTENSION_CLASS'],
include_dirs=['../ExtensionClass/'],
sources= ['TimeStamp.c']
)
coptimizations = Extension(name = 'ZODB.coptimizations',
include_dirs=['../ExtensionClass/'],
sources= ['coptimizations.c']
)
winlock = Extension(name = 'ZODB.winlock',
sources = ['winlock.c'])
setup(name = "ZODB",
version = "XXX",
description = "XXX",
author = "Jim Fulton",
author_email = "XXX",
url = "XXX",
packages=['ZODB'],
package_dir = {'ZODB':'.'},
ext_modules = [cPersistence, cPickleCache, TimeStamp,
coptimizations, winlock]
)
--amk