Commit d3ebdeed authored by Jim Fulton's avatar Jim Fulton

Converted to a buildout and converted externals to dependencies.

parent 56aa23fb
ZEO
ZODB
ZODB-Scripts
ZopeUndo
LICENSE.txt
MANIFEST
MANIFEST.in
NEWS.txt
README.txt
log.ini
setup.py
test.py
doc/ACKS
doc/Makefile
doc/README.txt
doc/storage.pdf
doc/storage.tex
doc/zdctl.txt
doc/zodb.pdf
doc/ZConfig/Makefile
doc/ZConfig/README.txt
doc/ZConfig/schema.dtd
doc/ZConfig/xmlmarkup.perl
doc/ZConfig/xmlmarkup.sty
doc/ZConfig/zconfig.pdf
doc/ZConfig/zconfig.tex
doc/ZEO/README.txt
doc/ZEO/ZopeREADME.txt
doc/ZEO/cache.txt
doc/ZEO/howto.txt
doc/ZEO/trace.txt
doc/guide/README
doc/guide/TODO
doc/guide/admin.tex
doc/guide/chatter.py
doc/guide/gfdl.tex
doc/guide/indexing.tex
doc/guide/introduction.tex
doc/guide/links.tex
doc/guide/modules.tex
doc/guide/prog-zodb.tex
doc/guide/storages.tex
doc/guide/transactions.tex
doc/guide/zeo.tex
doc/guide/zodb.tex
src/BTrees/BTreeItemsTemplate.c
src/BTrees/BTreeModuleTemplate.c
src/BTrees/BTreeTemplate.c
src/BTrees/BucketTemplate.c
src/BTrees/IIBTree.py
src/BTrees/IOBTree.py
src/BTrees/Interfaces.py
src/BTrees/Length.py
src/BTrees/Maintainer.txt
src/BTrees/MergeTemplate.c
src/BTrees/OIBTree.py
src/BTrees/OOBTree.py
src/BTrees/SetOpTemplate.c
src/BTrees/SetTemplate.c
src/BTrees/TreeSetTemplate.c
src/BTrees/_IIBTree.c
src/BTrees/_IOBTree.c
src/BTrees/_OIBTree.c
src/BTrees/_OOBTree.c
src/BTrees/__init__.py
src/BTrees/_fsBTree.c
src/BTrees/check.py
src/BTrees/intkeymacros.h
src/BTrees/intvaluemacros.h
src/BTrees/objectkeymacros.h
src/BTrees/objectvaluemacros.h
src/BTrees/sorters.c
src/BTrees/tests/__init__.py
src/BTrees/tests/testBTrees.py
src/BTrees/tests/testBTreesUnicode.py
src/BTrees/tests/testConflict.py
src/BTrees/tests/testSetOps.py
src/BTrees/tests/test_btreesubclass.py
src/BTrees/tests/test_check.py
src/BTrees/tests/test_compare.py
src/Persistence/_Persistence.c
src/Persistence/__init__.py
src/Persistence/mapping.py
src/Persistence/tests/__init__.py
src/Persistence/tests/testPersistent.py
src/Persistence/tests/test_ExtensionClass.py
src/Persistence/tests/test_mapping.py
src/ThreadedAsync/LoopCallback.py
src/ThreadedAsync/__init__.py
src/ZConfig/BRANCHES.txt
src/ZConfig/__init__.py
src/ZConfig/cfgparser.py
src/ZConfig/cmdline.py
src/ZConfig/datatypes.py
src/ZConfig/info.py
src/ZConfig/loader.py
src/ZConfig/matcher.py
src/ZConfig/schema.py
src/ZConfig/substitution.py
src/ZConfig/url.py
src/ZConfig/components/__init__.py
src/ZConfig/components/basic/__init__.py
src/ZConfig/components/basic/component.xml
src/ZConfig/components/basic/mapping.py
src/ZConfig/components/basic/mapping.xml
src/ZConfig/components/basic/tests/__init__.py
src/ZConfig/components/basic/tests/test_mapping.py
src/ZConfig/components/logger/__init__.py
src/ZConfig/components/logger/abstract.xml
src/ZConfig/components/logger/base-logger.xml
src/ZConfig/components/logger/component.xml
src/ZConfig/components/logger/datatypes.py
src/ZConfig/components/logger/eventlog.xml
src/ZConfig/components/logger/factory.py
src/ZConfig/components/logger/handlers.py
src/ZConfig/components/logger/handlers.xml
src/ZConfig/components/logger/logger.py
src/ZConfig/components/logger/logger.xml
src/ZConfig/components/logger/loghandler.py
src/ZConfig/components/logger/tests/__init__.py
src/ZConfig/components/logger/tests/test_logger.py
src/ZConfig/doc/Makefile
src/ZConfig/doc/README.txt
src/ZConfig/doc/schema.dtd
src/ZConfig/doc/xmlmarkup.perl
src/ZConfig/doc/xmlmarkup.sty
src/ZConfig/doc/zconfig.pdf
src/ZConfig/doc/zconfig.tex
src/ZConfig/scripts/zconfig
src/ZConfig/tests/__init__.py
src/ZConfig/tests/runtests.bat
src/ZConfig/tests/runtests.py
src/ZConfig/tests/support.py
src/ZConfig/tests/test_cfgimports.py
src/ZConfig/tests/test_cmdline.py
src/ZConfig/tests/test_config.py
src/ZConfig/tests/test_datatypes.py
src/ZConfig/tests/test_loader.py
src/ZConfig/tests/test_schema.py
src/ZConfig/tests/test_subst.py
src/ZConfig/tests/input/base-datatype1.xml
src/ZConfig/tests/input/base-datatype2.xml
src/ZConfig/tests/input/base-keytype1.xml
src/ZConfig/tests/input/base-keytype2.xml
src/ZConfig/tests/input/base.xml
src/ZConfig/tests/input/include.conf
src/ZConfig/tests/input/inner.conf
src/ZConfig/tests/input/library.xml
src/ZConfig/tests/input/logger.xml
src/ZConfig/tests/input/outer.conf
src/ZConfig/tests/input/simple.conf
src/ZConfig/tests/input/simple.xml
src/ZConfig/tests/input/simplesections.conf
src/ZConfig/tests/input/simplesections.xml
src/ZConfig/tests/library/README.txt
src/ZConfig/tests/library/__init__.py
src/ZConfig/tests/library/thing/__init__.py
src/ZConfig/tests/library/thing/component.xml
src/ZConfig/tests/library/thing/extras/extras.xml
src/ZConfig/tests/library/widget/__init__.py
src/ZConfig/tests/library/widget/component.xml
src/ZConfig/tests/library/widget/extra.xml
src/ZEO/ClientStorage.py
src/ZEO/ClientStub.py
src/ZEO/CommitLog.py
src/ZEO/DebugServer.py
src/ZEO/Exceptions.py
src/ZEO/README.txt
src/ZEO/ServerStub.py
src/ZEO/StorageServer.py
src/ZEO/TransactionBuffer.py
src/ZEO/__init__.py
src/ZEO/cache.py
src/ZEO/component.xml
src/ZEO/mkzeoinst.py
src/ZEO/monitor.py
src/ZEO/runzeo.py
src/ZEO/schema.xml
src/ZEO/simul.py
src/ZEO/stats.py
src/ZEO/util.py
src/ZEO/version.txt
src/ZEO/zeoctl.py
src/ZEO/zeoctl.xml
src/ZEO/zeopasswd.py
src/ZEO/auth/__init__.py
src/ZEO/auth/auth_digest.py
src/ZEO/auth/base.py
src/ZEO/auth/hmac.py
src/ZEO/tests/Cache.py
src/ZEO/tests/CommitLockTests.py
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/InvalidationTests.py
src/ZEO/tests/TestThread.py
src/ZEO/tests/ThreadTests.py
src/ZEO/tests/__init__.py
src/ZEO/tests/auth_plaintext.py
src/ZEO/tests/deadlock.py
src/ZEO/tests/forker.py
src/ZEO/tests/multi.py
src/ZEO/tests/speed.py
src/ZEO/tests/stress.py
src/ZEO/tests/testAuth.py
src/ZEO/tests/testConnection.py
src/ZEO/tests/testMonitor.py
src/ZEO/tests/testTransactionBuffer.py
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEOOptions.py
src/ZEO/tests/test_cache.py
src/ZEO/tests/zeoserver.py
src/ZEO/zrpc/__init__.py
src/ZEO/zrpc/_hmac.py
src/ZEO/zrpc/client.py
src/ZEO/zrpc/connection.py
src/ZEO/zrpc/error.py
src/ZEO/zrpc/log.py
src/ZEO/zrpc/marshal.py
src/ZEO/zrpc/server.py
src/ZEO/zrpc/smac.py
src/ZEO/zrpc/trigger.py
src/ZODB/ActivityMonitor.py
src/ZODB/BaseStorage.py
src/ZODB/ConflictResolution.py
src/ZODB/Connection.py
src/ZODB/DB.py
src/ZODB/DemoStorage.py
src/ZODB/ExportImport.py
src/ZODB/MappingStorage.py
src/ZODB/Mount.py
src/ZODB/POSException.py
src/ZODB/TmpStore.py
src/ZODB/UndoLogCompatible.py
src/ZODB/ZApplication.py
src/ZODB/__init__.py
src/ZODB/broken.py
src/ZODB/component.xml
src/ZODB/config.py
src/ZODB/config.xml
src/ZODB/conversionhack.py
src/ZODB/dbmStorage.py
src/ZODB/fsIndex.py
src/ZODB/fsrecover.py
src/ZODB/fstools.py
src/ZODB/interfaces.py
src/ZODB/lock_file.py
src/ZODB/serialize.py
src/ZODB/storage.xml
src/ZODB/subtransactions.txt
src/ZODB/transact.py
src/ZODB/utils.py
src/ZODB/winlock.c
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/__init__.py
src/ZODB/FileStorage/format.py
src/ZODB/FileStorage/fsdump.py
src/ZODB/FileStorage/fspack.py
src/ZODB/tests/BasicStorage.py
src/ZODB/tests/ConflictResolution.py
src/ZODB/tests/Corruption.py
src/ZODB/tests/HistoryStorage.py
src/ZODB/tests/IteratorStorage.py
src/ZODB/tests/LocalStorage.py
src/ZODB/tests/MTStorage.py
src/ZODB/tests/MinPO.py
src/ZODB/tests/PackableStorage.py
src/ZODB/tests/PersistentStorage.py
src/ZODB/tests/ReadOnlyStorage.py
src/ZODB/tests/RecoveryStorage.py
src/ZODB/tests/RevisionStorage.py
src/ZODB/tests/StorageTestBase.py
src/ZODB/tests/Synchronization.py
src/ZODB/tests/TransactionalUndoStorage.py
src/ZODB/tests/TransactionalUndoVersionStorage.py
src/ZODB/tests/VersionStorage.py
src/ZODB/tests/__init__.py
src/ZODB/tests/dangle.py
src/ZODB/tests/sampledm.py
src/ZODB/tests/speed.py
src/ZODB/tests/testActivityMonitor.py
src/ZODB/tests/testBroken.py
src/ZODB/tests/testCache.py
src/ZODB/tests/testConfig.py
src/ZODB/tests/testConnection.py
src/ZODB/tests/testDB.py
src/ZODB/tests/testDemoStorage.py
src/ZODB/tests/testFileStorage.py
src/ZODB/tests/testMappingStorage.py
src/ZODB/tests/testPersistentList.py
src/ZODB/tests/testPersistentMapping.py
src/ZODB/tests/testRecover.py
src/ZODB/tests/testSerialize.py
src/ZODB/tests/testSubTransaction.py
src/ZODB/tests/testTimeStamp.py
src/ZODB/tests/testUtils.py
src/ZODB/tests/testZODB.py
src/ZODB/tests/test_cache.py
src/ZODB/tests/test_datamanageradapter.py
src/ZODB/tests/test_storage.py
src/ZODB/tests/testfsIndex.py
src/ZODB/tests/testmvcc.py
src/ZODB/tests/util.py
src/ZODB/tests/warnhook.py
src/ZopeUndo/Prefix.py
src/ZopeUndo/__init__.py
src/ZopeUndo/tests/__init__.py
src/ZopeUndo/tests/testPrefix.py
src/persistent/README.txt
src/persistent/TimeStamp.c
src/persistent/__init__.py
src/persistent/cPersistence.c
src/persistent/cPersistence.h
src/persistent/cPickleCache.c
src/persistent/dict.py
src/persistent/interfaces.py
src/persistent/list.py
src/persistent/mapping.py
src/persistent/ring.c
src/persistent/ring.h
src/persistent/wref.py
src/persistent/tests/__init__.py
src/persistent/tests/persistent.txt
src/persistent/tests/persistenttestbase.py
src/persistent/tests/testPersistent.py
src/persistent/tests/test_PickleCache.py
src/persistent/tests/test_list.py
src/persistent/tests/test_overriding_attrs.py
src/persistent/tests/test_persistent.py
src/persistent/tests/test_pickle.py
src/persistent/tests/test_wref.py
src/scripts/README.txt
src/scripts/analyze.py
src/scripts/checkbtrees.py
src/scripts/fsdump.py
src/scripts/fsrefs.py
src/scripts/fsstats.py
src/scripts/fstail.py
src/scripts/fstest.py
src/scripts/migrate.py
src/scripts/netspace.py
src/scripts/parsezeolog.py
src/scripts/repozo.py
src/scripts/space.py
src/scripts/timeout.py
src/scripts/zeopack.py
src/scripts/zeoqueue.py
src/scripts/zeoreplay.py
src/scripts/zeoserverlog.py
src/scripts/zeoup.py
src/scripts/zodbload.py
src/scripts/tests/test-checker.fs
src/scripts/tests/testfstest.py
src/scripts/tests/testzeopack.py
src/transaction/README.txt
src/transaction/__init__.py
src/transaction/_manager.py
src/transaction/_transaction.py
src/transaction/interfaces.py
src/transaction/notes.txt
src/transaction/util.py
src/transaction/tests/__init__.py
src/transaction/tests/abstestIDataManager.py
src/transaction/tests/test_SampleDataManager.py
src/transaction/tests/test_register_compat.py
src/transaction/tests/test_transaction.py
src/transaction/tests/test_util.py
src/zLOG/EventLogger.py
src/zLOG/__init__.py
src/zLOG/tests/__init__.py
src/zLOG/tests/test_logging.py
src/zLOG/tests/testzLog.py
src/zdaemon/__init__.py
src/zdaemon/component.xml
src/zdaemon/sample.conf
src/zdaemon/schema.xml
src/zdaemon/zdctl.py
src/zdaemon/zdoptions.py
src/zdaemon/zdrun.py
src/zdaemon/tests/__init__.py
src/zdaemon/tests/donothing.sh
src/zdaemon/tests/nokill.py
src/zdaemon/tests/parent.py
src/zdaemon/tests/testzdoptions.py
src/zdaemon/tests/testzdrun.py
include MANIFEST MANIFEST.in
include *.txt
include test.py log.ini
recursive-include src *.h *.c *.xml *.txt *.sh *.conf *.bat
include src/ZConfig/scripts/zconfig
graft doc
graft src/scripts
graft src/ZConfig/doc
global-exclude .cvsignore
<distribution>
doc
log.ini
test.py
COPYRIGHT.txt
LICENSE.txt
NEWS.txt
README.txt
</distribution>
<collection>
doc -
setup.py -
src -
zpkg.conf -
buildsupport -
</collection>
Metadata-version: 1.1
Name: ZODB3
License: ZPL 2.1
Home-page: http://www.zope.org/Wikis/ZODB
Summary: Zope Object Database: object database and persistence
Description:
The Zope Object Database provides an object-oriented database
for Python that provides a high-degree of transparency.
Applications can take advantage of object database features
with few, if any, changes to application logic. ZODB includes
features such as a plugable storage interface, rich
transaction support, and undo.
Maintainer: ZODB Developers
Maintainer-email: zodb-dev@zope.org
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
...@@ -16,7 +16,6 @@ The components you get with the ZODB release are as follows: ...@@ -16,7 +16,6 @@ The components you get with the ZODB release are as follows:
- Standard storages such as FileStorage - Standard storages such as FileStorage
- The persistent BTrees modules - The persistent BTrees modules
- ZEO - ZEO
- ZConfig -- a Zope configuration language
- documentation - documentation
Our primary development platforms are Linux and Windows 2000. The Our primary development platforms are Linux and Windows 2000. The
...@@ -34,7 +33,7 @@ older versions of the BTrees package will not be able to load ...@@ -34,7 +33,7 @@ older versions of the BTrees package will not be able to load
persistent BTrees that use 64-bit data (an exception will be raised on persistent BTrees that use 64-bit data (an exception will be raised on
load). load).
The Zope 2.8 release, and Zope3 releases, should be compatible with this The Zope 2.10 release, and Zope 3.3 releases, should be compatible with this
version of ZODB. Note that Zope 2.7 and higher includes ZEO, so this package version of ZODB. Note that Zope 2.7 and higher includes ZEO, so this package
should only be needed to run a ZEO server. should only be needed to run a ZEO server.
...@@ -74,11 +73,24 @@ be sure that you've installed the development RPMs too, since ZODB ...@@ -74,11 +73,24 @@ be sure that you've installed the development RPMs too, since ZODB
builds Python extensions. If you have the source release of ZODB, builds Python extensions. If you have the source release of ZODB,
you will need a C compiler. you will need a C compiler.
You also need the ZConfig, zdaemon, zope.interface, zope.proxy and
zope.testing packages. If you are using easy_install or zc.buildout to
install ZODB, then these will be installed for you automatically.
Installation Installation
------------ ------------
ZODB is released as a distutils package. To build it, run the setup ZODB is released as a distutils package. The easiest ways to build
script:: and install it are to use `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_, or
`zc.buildout <http://www.python.org/pypi/zc.buildout>`_.
To install by hand, first install the dependencies, ZConfig, zdaemon,
zope.interface, zope.proxy and zope.testing. These can be found
either in the `Python Package Index <http://www.python.org/pypi>`_,
or at http://download.zope.org/distribution/.
To build it, run the setup script::
% python setup.py build % python setup.py build
...@@ -104,13 +116,19 @@ This should now make all of ZODB accessible to your Python programs. ...@@ -104,13 +116,19 @@ This should now make all of ZODB accessible to your Python programs.
Testing for Developers Testing for Developers
---------------------- ----------------------
When working from a ZODB checkout, do an in-place build instead:: The ZODB check outs are `buldouts <http://www.python.org/pypi/zc.buildout>`_.
When working from a ZODB checkout, first run the bootstrap.py script
to initialize the buildout:
% python bootstrap.py
and then use the buildout script to build ZODB and gather the dependencies:
% python setup.py build_ext -i % bin/buildout
followed by:: This creates a test script:
% python test.py -v % bin/test -v
This command will run all the tests, printing a single dot for each This command will run all the tests, printing a single dot for each
test. When it finishes, it will print a test summary. The exact test. When it finishes, it will print a test summary. The exact
......
############################################################################## ##############################################################################
# #
# Copyright (c) 2004 Zope Corporation and Contributors. # Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved. # All Rights Reserved.
# #
# This software is subject to the provisions of the Zope Public License, # This software is subject to the provisions of the Zope Public License,
...@@ -11,5 +11,42 @@ ...@@ -11,5 +11,42 @@
# FOR A PARTICULAR PURPOSE. # FOR A PARTICULAR PURPOSE.
# #
############################################################################## ##############################################################################
# """Bootstrap a buildout-based project
# This file is necessary to make this directory a package.
Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.
$Id$
"""
import os, shutil, sys, tempfile, urllib2
tmpeggs = tempfile.mkdtemp()
ez = {}
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
).read() in ez
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
import pkg_resources
cmd = 'from setuptools.command.easy_install import main; main()'
if sys.platform == 'win32':
cmd = '"%s"' % cmd # work around spawn lamosity on windows
ws = pkg_resources.working_set
assert os.spawnle(
os.P_WAIT, sys.executable, sys.executable,
'-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location
),
) == 0
ws.add_entry(tmpeggs)
ws.require('zc.buildout')
import zc.buildout.buildout
zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
shutil.rmtree(tmpeggs)
[buildout]
develop = .
parts = test scripts
find-links = http://download.zope.org/distribution/
[test]
recipe = zc.recipe.testrunner
eggs = ZODB3
[scripts]
recipe = zc.recipe.egg
eggs = ZODB3
interpreter = py
...@@ -39,17 +39,15 @@ Operating System :: Unix ...@@ -39,17 +39,15 @@ Operating System :: Unix
import glob import glob
import os import os
import sys import sys
from distutils.core import setup
from distutils.extension import Extension from distutils.extension import Extension
from distutils import dir_util from distutils import dir_util
from distutils.core import setup
from distutils.dist import Distribution from distutils.dist import Distribution
from distutils.command.install_lib import install_lib from distutils.command.install_lib import install_lib
from distutils.command.build_py import build_py from distutils.command.build_py import build_py
from distutils.util import convert_path from distutils.util import convert_path
if sys.version_info < (2, 4, 2): if sys.version_info < (2, 4, 2):
print "ZODB 3.7 requires Python 2.4.2 or higher" print "This version of ZODB requires Python 2.4.2 or higher"
sys.exit(0) sys.exit(0)
# Include directories for C extensions # Include directories for C extensions
...@@ -113,32 +111,15 @@ TimeStamp = Extension(name = 'persistent.TimeStamp', ...@@ -113,32 +111,15 @@ TimeStamp = Extension(name = 'persistent.TimeStamp',
sources= ['src/persistent/TimeStamp.c'] sources= ['src/persistent/TimeStamp.c']
) )
##coptimizations = Extension(name = 'ZODB.coptimizations',
## include_dirs = include,
## sources= ['src/ZODB/coptimizations.c']
## )
winlock = Extension(name = 'ZODB.winlock', winlock = Extension(name = 'ZODB.winlock',
include_dirs = include, include_dirs = include,
sources = ['src/ZODB/winlock.c'] sources = ['src/ZODB/winlock.c']
) )
cZopeInterface = Extension(
name = 'zope.interface._zope_interface_coptimizations',
sources= ['src/zope/interface/_zope_interface_coptimizations.c']
)
cZopeProxy = Extension(
name = 'zope.proxy._zope_proxy_proxy',
sources= ['src/zope/proxy/_zope_proxy_proxy.c']
)
exts += [cPersistence, exts += [cPersistence,
cPickleCache, cPickleCache,
TimeStamp, TimeStamp,
winlock, winlock,
cZopeInterface,
cZopeProxy,
] ]
# The ZODB.zodb4 code is not being packaged, because it is only # The ZODB.zodb4 code is not being packaged, because it is only
...@@ -147,41 +128,10 @@ exts += [cPersistence, ...@@ -147,41 +128,10 @@ exts += [cPersistence,
packages = ["BTrees", "BTrees.tests", packages = ["BTrees", "BTrees.tests",
"ZEO", "ZEO.auth", "ZEO.zrpc", "ZEO.tests", "ZEO", "ZEO.auth", "ZEO.zrpc", "ZEO.tests",
"ZODB", "ZODB.FileStorage", "ZODB.tests", "ZODB", "ZODB.FileStorage", "ZODB.tests",
#"Persistence", "Persistence.tests",
"persistent", "persistent.tests", "persistent", "persistent.tests",
"transaction", "transaction.tests", "transaction", "transaction.tests",
"ThreadedAsync", "ThreadedAsync",
"zdaemon", "zdaemon.tests",
"zope",
"zope.interface", "zope.interface.tests",
"zope.interface.common", "zope.interface.common.tests",
"zope.proxy", "zope.proxy.tests",
"zope.testing",
"ZopeUndo", "ZopeUndo.tests", "ZopeUndo", "ZopeUndo.tests",
"ZConfig", "ZConfig.tests",
"ZConfig.components",
"ZConfig.components.basic", "ZConfig.components.basic.tests",
"ZConfig.components.logger", "ZConfig.components.logger.tests",
"ZConfig.tests.library", "ZConfig.tests.library.widget",
"ZConfig.tests.library.thing",
]
scripts = ["src/scripts/fsdump.py",
"src/scripts/fsoids.py",
"src/scripts/fsrefs.py",
"src/scripts/fstail.py",
"src/scripts/fstest.py",
"src/scripts/repozo.py",
"src/scripts/zeopack.py",
"src/scripts/runzeo.py",
"src/scripts/zeopasswd.py",
"src/scripts/mkzeoinst.py",
"src/scripts/zeoctl.py",
"src/ZConfig/scripts/zconfig",
"src/zdaemon/zdrun.py",
"src/zdaemon/zdctl.py",
] ]
def copy_other_files(cmd, outputbase): def copy_other_files(cmd, outputbase):
...@@ -190,37 +140,14 @@ def copy_other_files(cmd, outputbase): ...@@ -190,37 +140,14 @@ def copy_other_files(cmd, outputbase):
extensions = ["*.conf", "*.xml", "*.txt", "*.sh"] extensions = ["*.conf", "*.xml", "*.txt", "*.sh"]
directories = [ directories = [
"transaction", "transaction",
"transaction/tests",
"persistent/tests", "persistent/tests",
"ZConfig/components/basic",
"ZConfig/components/logger",
"ZConfig/tests/input",
"ZConfig/tests/library",
"ZConfig/tests/library/thing",
"ZConfig/tests/library/thing/extras",
"ZConfig/tests/library/widget",
"ZEO", "ZEO",
"ZODB", "ZODB",
"ZODB/tests", "ZODB/tests",
"zdaemon",
"zdaemon/tests",
"zope/interface", "zope/interface/tests",
"zope/testing",
] ]
# zope.testing's testrunner-ex is not a package, but contains
# packages, in a fairly elaborate subtree. Major special-casing
# for this. First find all the (non-SVN) directories starting
# there, and append them all to `directories`.
for root, dirs, files in os.walk("src/zope/testing/testrunner-ex"):
dirs[:] = [d for d in dirs if ".svn" not in d]
assert root.startswith("src/")
normpath = root[4:].replace("\\", "/")
directories.append(normpath)
for dir in directories: for dir in directories:
exts = extensions exts = extensions
if dir.startswith("zope/testing/testrunner-ex"):
# testrunner-ex isn't a package, so not even the .py files
# get copied unless we force that there.
exts = extensions + ["*.py"]
dir = convert_path(dir) dir = convert_path(dir)
inputdir = os.path.join("src", dir) inputdir = os.path.join("src", dir)
outputdir = os.path.join(outputbase, dir) outputdir = os.path.join(outputbase, dir)
...@@ -263,8 +190,55 @@ class MyDistribution(Distribution): ...@@ -263,8 +190,55 @@ class MyDistribution(Distribution):
doclines = __doc__.split("\n") doclines = __doc__.split("\n")
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
extra = dict(
scripts = ["src/ZODB/scripts/fsdump.py",
"src/ZODB/scripts/fsoids.py",
"src/ZODB/scripts/fsrefs.py",
"src/ZODB/scripts/fstail.py",
"src/ZODB/scripts/fstest.py",
"src/ZODB/scripts/repozo.py",
"src/ZEO/scripts/zeopack.py",
"src/ZEO/scripts/runzeo.py",
"src/ZEO/scripts/zeopasswd.py",
"src/ZEO/scripts/mkzeoinst.py",
"src/ZEO/scripts/zeoctl.py",
],
)
else:
entry_points = """
[console_scripts]
fsdump = ZODB.FileStorage.fsdump:main
fsoids = ZODB.scripts.fsoids:main
fsrefs = ZODB.scripts.fsrefs:main
fstail = ZODB.scripts.fstail:Main
repozo = ZODB.scripts.repozo:main
zeopack = ZEO.scripts.zeopack:main
runzeo = ZEO.runzeo:main
zeopasswd = ZEO.zeopasswd:main
mkzeoinst = ZEO.mkzeoinst:main
zeoctl = ZEO.zeoctl:main
"""
extra = dict(
install_requires = [
'zope.interface',
'zope.proxy',
'zope.testing',
'ZConfig',
'zdaemon',
],
zip_safe = False,
dependency_links = ['http://download.zope.org/distribution/'],
entry_points = entry_points,
)
scripts = []
setup(name="ZODB3", setup(name="ZODB3",
version="3.5.0a6", version="3.7.0a2",
maintainer="Zope Corporation", maintainer="Zope Corporation",
maintainer_email="zodb-dev@zope.org", maintainer_email="zodb-dev@zope.org",
url = "http://www.zope.org/Wikis/ZODB", url = "http://www.zope.org/Wikis/ZODB",
...@@ -280,5 +254,4 @@ setup(name="ZODB3", ...@@ -280,5 +254,4 @@ setup(name="ZODB3",
classifiers = filter(None, classifiers.split("\n")), classifiers = filter(None, classifiers.split("\n")),
long_description = "\n".join(doclines[2:]), long_description = "\n".join(doclines[2:]),
distclass = MyDistribution, distclass = MyDistribution,
scripts = scripts, **extra)
)
This directory contains a collection of utilities for working with
ZEO. Some are more useful than others. If you install ZODB using
distutils ("python setup.py install"), some of these will be
installed.
Unless otherwise noted, these scripts are invoked with the name of the
Data.fs file as their only argument. Example: checkbtrees.py data.fs.
parsezeolog.py -- parse BLATHER logs from ZEO server
This script may be obsolete. It has not been tested against the
current log output of the ZEO server.
Reports on the time and size of transactions committed by a ZEO
server, by inspecting log messages at BLATHER level.
timeout.py -- script to test transaction timeout
usage: timeout.py address delay [storage-name]
This script connects to a storage, begins a transaction, calls store()
and tpc_vote(), and then sleeps forever. This should trigger the
transaction timeout feature of the server.
zeopack.py -- pack a ZEO server
The script connects to a server and calls pack() on a specific
storage. See the script for usage details.
zeoreplay.py -- experimental script to replay transactions from a ZEO log
Like parsezeolog.py, this may be obsolete because it was written
against an earlier version of the ZEO server. See the script for
usage details.
zeoup.py
usage: zeoup.py [options]
The test will connect to a ZEO server, load the root object, and
attempt to update the zeoup counter in the root. It will report
success if it updates to counter or if it gets a ConflictError. A
ConflictError is considered a success, because the client was able to
start a transaction.
See the script for details about the options.
zeoserverlog.py -- analyze ZEO server log for performance statistics
See the module docstring for details; there are a large number of
options. New in ZODB3 3.1.4.
zeoqueue.py -- report number of clients currently waiting in the ZEO queue
See the module docstring for details.
...@@ -101,6 +101,8 @@ def options(args): ...@@ -101,6 +101,8 @@ def options(args):
return auth_protocol, auth_db, auth_realm, delete, username, password return auth_protocol, auth_db, auth_realm, delete, username, password
def main(args=None, dbclass=None): def main(args=None, dbclass=None):
if args is None:
args = sys.argv[1:]
p, auth_db, auth_realm, delete, username, password = options(args) p, auth_db, auth_realm, delete, username, password = options(args)
if p is None: if p is None:
usage("Error: configuration does not specify auth protocol") usage("Error: configuration does not specify auth protocol")
......
...@@ -130,3 +130,7 @@ class Dumper: ...@@ -130,3 +130,7 @@ class Dumper:
if not dlen: if not dlen:
sbp = self.file.read(8) sbp = self.file.read(8)
print >> self.dest, "backpointer: %d" % u64(sbp) print >> self.dest, "backpointer: %d" % u64(sbp)
def main():
import sys
fsdump(sys.argv[1])
This directory contains a collection of utilities for managing ZODB This directory contains a collection of utilities for managing ZODB
databases. Some are more useful than others. If you install ZODB databases. Some are more useful than others. If you install ZODB
using distutils ("python setup.py install"), fsdump.py, fstest.py, using distutils ("python setup.py install"), a few of these will be installed.
repozo.py, and zeopack.py will be installed in /usr/local/bin.
Unless otherwise noted, these scripts are invoked with the name of the Unless otherwise noted, these scripts are invoked with the name of the
Data.fs file as their only argument. Example: checkbtrees.py data.fs. Data.fs file as their only argument. Example: checkbtrees.py data.fs.
...@@ -95,45 +94,12 @@ This script connects to a storage, begins a transaction, calls store() ...@@ -95,45 +94,12 @@ This script connects to a storage, begins a transaction, calls store()
and tpc_vote(), and then sleeps forever. This should trigger the and tpc_vote(), and then sleeps forever. This should trigger the
transaction timeout feature of the server. transaction timeout feature of the server.
zeopack.py -- pack a ZEO server
The script connects to a server and calls pack() on a specific
storage. See the script for usage details.
zeoreplay.py -- experimental script to replay transactions from a ZEO log
Like parsezeolog.py, this may be obsolete because it was written
against an earlier version of the ZEO server. See the script for
usage details.
zeoup.py
usage: zeoup.py [options]
The test will connect to a ZEO server, load the root object, and
attempt to update the zeoup counter in the root. It will report
success if it updates to counter or if it gets a ConflictError. A
ConflictError is considered a success, because the client was able to
start a transaction.
See the script for details about the options.
zodbload.py -- exercise ZODB under a heavy synthesized Zope-like load zodbload.py -- exercise ZODB under a heavy synthesized Zope-like load
See the module docstring for details. Note that this script requires See the module docstring for details. Note that this script requires
Zope. New in ZODB3 3.1.4. Zope. New in ZODB3 3.1.4.
zeoserverlog.py -- analyze ZEO server log for performance statistics
See the module docstring for details; there are a large number of
options. New in ZODB3 3.1.4.
fsrefs.py -- check FileStorage for dangling references fsrefs.py -- check FileStorage for dangling references
...@@ -148,8 +114,3 @@ Optional argument -n specifies ntxn, and defaults to 10. ...@@ -148,8 +114,3 @@ Optional argument -n specifies ntxn, and defaults to 10.
migrate.py -- do a storage migration and gather statistics migrate.py -- do a storage migration and gather statistics
See the module docstring for details. See the module docstring for details.
zeoqueue.py -- report number of clients currently waiting in the ZEO queue
See the module docstring for details.
...@@ -130,6 +130,9 @@ def analyze_rec(report, record): ...@@ -130,6 +130,9 @@ def analyze_rec(report, record):
except Exception, err: except Exception, err:
print err print err
if __name__ == "__main__": def main():
path = sys.argv[1] path = sys.argv[1]
report(analyze(path)) report(analyze(path))
if __name__ == "__main__":
main()
...@@ -65,7 +65,15 @@ def get_subobjects(obj): ...@@ -65,7 +65,15 @@ def get_subobjects(obj):
return sub return sub
def main(fname): def main(fname=None):
if fname is None:
import sys
try:
fname, = sys.argv[1:]
except:
print __doc__
sys.exit(2)
fs = FileStorage(fname, read_only=1) fs = FileStorage(fname, read_only=1)
cn = ZODB.DB(fs).open() cn = ZODB.DB(fs).open()
rt = cn.root() rt = cn.root()
...@@ -112,11 +120,4 @@ def main(fname): ...@@ -112,11 +120,4 @@ def main(fname):
print "total", len(fs._index), "found", found print "total", len(fs._index), "found", found
if __name__ == "__main__": if __name__ == "__main__":
import sys main()
try:
fname, = sys.argv[1:]
except:
print __doc__
sys.exit(2)
main(fname)
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
"""Print a text summary of the contents of a FileStorage.""" """Print a text summary of the contents of a FileStorage."""
from ZODB.FileStorage.fsdump import fsdump from ZODB.FileStorage.fsdump import main
if __name__ == "__main__": if __name__ == "__main__":
import sys main()
fsdump(sys.argv[1])
...@@ -95,7 +95,19 @@ def report(oid, data, serial, missing): ...@@ -95,7 +95,19 @@ def report(oid, data, serial, missing):
print "\toid %s %s: %r" % (oid_repr(oid), reason, description) print "\toid %s %s: %r" % (oid_repr(oid), reason, description)
print print
def main(path): def main(path=None):
if path is None:
import sys
import getopt
opts, args = getopt.getopt(sys.argv[1:], "v")
for k, v in opts:
if k == "-v":
VERBOSE += 1
path, = args
fs = FileStorage(path, read_only=1) fs = FileStorage(path, read_only=1)
# Set of oids in the index that failed to load due to POSKeyError. # Set of oids in the index that failed to load due to POSKeyError.
...@@ -142,13 +154,4 @@ def main(path): ...@@ -142,13 +154,4 @@ def main(path):
report(oid, data, serial, missing) report(oid, data, serial, missing)
if __name__ == "__main__": if __name__ == "__main__":
import sys main()
import getopt
opts, args = getopt.getopt(sys.argv[1:], "v")
for k, v in opts:
if k == "-v":
VERBOSE += 1
path, = args
main(path)
...@@ -121,7 +121,9 @@ def revision_detail(lifetimes, classes): ...@@ -121,7 +121,9 @@ def revision_detail(lifetimes, classes):
if keep: if keep:
h.report("Number of revisions for %s" % name, binsize=10) h.report("Number of revisions for %s" % name, binsize=10)
def main(path): def main(path=None):
if path is None:
path = sys.argv[1]
txn_objects = Histogram() # histogram of txn size in objects txn_objects = Histogram() # histogram of txn size in objects
txn_bytes = Histogram() # histogram of txn size in bytes txn_bytes = Histogram() # histogram of txn size in bytes
obj_size = Histogram() # histogram of object size obj_size = Histogram() # histogram of object size
...@@ -196,4 +198,4 @@ def main(path): ...@@ -196,4 +198,4 @@ def main(path):
class_detail(class_size) class_detail(class_size)
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv[1]) main()
...@@ -39,11 +39,15 @@ def main(path, ntxn): ...@@ -39,11 +39,15 @@ def main(path, ntxn):
th = th.prev_txn() th = th.prev_txn()
i -= 1 i -= 1
if __name__ == "__main__": def Main():
ntxn = 10 ntxn = 10
opts, args = getopt.getopt(sys.argv[1:], "n:") opts, args = getopt.getopt(sys.argv[1:], "n:")
path, = args path, = args
for k, v in opts: for k, v in opts:
if k == '-n': if k == '-n':
ntxn = int(v) ntxn = int(v)
main(path, ntxn) Main(path, ntxn)
if __name__ == "__main__":
Main()
...@@ -203,7 +203,7 @@ def usage(): ...@@ -203,7 +203,7 @@ def usage():
print __doc__ print __doc__
sys.exit(-1) sys.exit(-1)
if __name__ == "__main__": def main():
import getopt import getopt
try: try:
...@@ -223,3 +223,6 @@ if __name__ == "__main__": ...@@ -223,3 +223,6 @@ if __name__ == "__main__":
sys.exit(-1) sys.exit(-1)
chatter("no errors detected") chatter("no errors detected")
if __name__ == "__main__":
main()
# Some simple tests for zeopack.py
# For this to work, zeopack.py must by on your PATH.
from ZODB.FileStorage import FileStorage
from ZODB.tests.StorageTestBase import StorageTestBase
from ZEO.tests import forker
import ZODB
import os
import socket
import tempfile
import threading
import time
import unittest
# TODO: The forker interface isn't clearly defined. It's different on
# different branches of ZEO. This will break someday.
# TODO: Only handle the Unix variant of the forker. Just to give Tim
# something to do.
class PackerTests(StorageTestBase):
def setUp(self):
self.started = 0
def start(self):
self.started =1
self.path = tempfile.mktemp(suffix=".fs")
self._storage = FileStorage(self.path)
self.db = ZODB.DB(self._storage)
self.do_updates()
self.pid, self.exit = forker.start_zeo_server(self._storage, self.addr)
def do_updates(self):
for i in range(100):
self._dostore()
def tearDown(self):
if not self.started:
return
self.db.close()
self._storage.close()
self.exit.close()
try:
os.kill(self.pid, 9)
except os.error:
pass
try:
os.waitpid(self.pid, 0)
except os.error, err:
##print "waitpid failed", err
pass
for ext in '', '.old', '.lock', '.index', '.tmp':
path = self.path + ext
try:
os.remove(path)
except os.error:
pass
def set_inet_addr(self):
self.host = socket.gethostname()
self.port = forker.get_port()
self.addr = self.host, self.port
def testPack(self):
self.set_inet_addr()
self.start()
status = os.system("zeopack.py -h %s -p %s" % (self.host, self.port))
assert status == 0
assert os.path.exists(self.path + ".old")
def testPackDays(self):
self.set_inet_addr()
self.start()
status = os.system("zeopack.py -h %s -p %s -d 1" % (self.host,
self.port))
# Since we specified one day, nothing should get packed
assert status == 0
assert not os.path.exists(self.path + ".old")
def testAF_UNIXPack(self):
self.addr = tempfile.mktemp(suffix=".zeo-socket")
self.start()
status = os.system("zeopack.py -U %s" % self.addr)
assert status == 0
assert os.path.exists(self.path + ".old")
def testNoServer(self):
status = os.system("zeopack.py -p 19")
assert status != 0
def testWaitForServer(self):
self.set_inet_addr()
def delayed_start():
time.sleep(11)
self.start()
t = threading.Thread(target=delayed_start)
t.start()
status = os.system("zeopack.py -h %s -p %s -W" % (self.host,
self.port))
t.join()
assert status == 0
assert os.path.exists(self.path + ".old")
class UpTest(unittest.TestCase):
def testUp(self):
status = os.system("zeoup.py -p 19")
# There is no ZEO server on port 19, so we should see non-zero
# exit status.
assert status != 0
if __name__ == "__main__":
unittest.main()
...@@ -95,7 +95,7 @@ def main(path): ...@@ -95,7 +95,7 @@ def main(path):
path = paths.get(oid, '-') path = paths.get(oid, '-')
print fmt % (U64(oid), len(data), total_size(oid), path, mod, klass) print fmt % (U64(oid), len(data), total_size(oid), path, mod, klass)
if __name__ == "__main__": def Main():
import sys import sys
import getopt import getopt
...@@ -118,3 +118,6 @@ if __name__ == "__main__": ...@@ -118,3 +118,6 @@ if __name__ == "__main__":
if o == '-v': if o == '-v':
VERBOSE += 1 VERBOSE += 1
main(path) main(path)
if __name__ == "__main__":
Main()
# zope is a container package, so it really doesn't include much.
<collection>
__init__.py
README.txt
</collection>
=====================
Zope Project Packages
=====================
The ``zope`` package is a pure namespace package holding packages
developed as part of the Zope 3 project.
Generally, the immediate subpackages of the ``zope`` package should be
useful and usable outside of the Zope application server. Subpackages
of the ``zope`` package should have minimal interdependencies,
although most depend on ``zope.interface``.
The one subpackage that's not usable outside the application server is
the ``app`` subpackage, ``zope.app``, which *is* the application
server. Sub-packages of ``zope.app`` are not usable outside of the
application server. If there's something in ``zope.app`` you want to
use elsewhere, let us know and we can talk about abstracting some of
it up out of ``zope.app``.
# zpkg config file
#
# To getnerate a ZODB release, use:
#
# zpkg -C zpkg.conf -v <version>
#
build-application no
collect-dependencies yes
default-collection ZODB3
<resources>
# This is the ZODB3 release package:
#
ZODB3 .
# This group is maintained as part of the ZODB project:
#
BTrees src/BTrees
persistent src/persistent
transaction src/transaction
ThreadedAsync src/ThreadedAsync
ZEO src/ZEO
ZODB src/ZODB
ZODB-Scripts src/scripts
ZopeUndo src/ZopeUndo
# These are copied in from the Zope3 project; they are needed for ZODB
# 3.4 and newer:
#
zope src/zope
zope.interface src/zope/interface
zope.proxy src/zope/proxy
zope.testing src/zope/testing
# These are copied in from the ZConfig and zdaemon projects:
#
ZConfig src/ZConfig
zdaemon src/zdaemon
</resources>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment