THIS DOCUMENT NEEDS TO BE UPDATED. THE INFO IT CONTAINS
IS STILL VALUABLE, SO USE YOUR BRAIN :-)
README.txt
bsddb3 v4.8.x
http://www.jcea.es/programacion/pybsddb.htm
2009-06-30
--------------------------------
This module is intended to be the definitive modern Berkeley DB
interface for Python. It should be both backwards compatible with
the earlier (circa Python 1.5 to 2.2) "bsddb" module in addition to
providing access to the much more powerful interface found in
Berkeley DB 4.x.
This module provides a nearly complete wrapping of the Oracle C API
for the Database Environment, Database, Cursor, Transaction and Lock
objects. Each of these is exposed as a Python Type in the
bsddb3.db module. The database objects can use different access
methods: btree, hash, recno, and queue. For the first time all of
these are fully supported in the Python wrappers. Please see the
documents in the docs directory for more details on the types and
methods provided.
There is also a collection of test cases in the test directory that
can be used to validate the modules, as well as giving an idea of how
to use bsddb3.db.
Thanks to The Written Word (http://thewrittenword.com/), bsddb3 was
known to pass its unit tests on these platforms:
HP-UX 10.20, 11.00
Tru64 UNIX 4.0D, 5.0, 5.1
IRIX 6.2, 6.5
Solaris 2.5.1, 2.6, 7, 8, 9, 10
AIX 4.3.2
In addition we've run it on a several varieties of Linux and of course
on Win32.
This wrapper should be compatible with Berkeley DB releases going back
to 4.1 up to and including DB 4.8. It should also be compatible
with Python versions from 2.3 to Python 2.7, and Python 3.0 to 3.2.
Installation
------------
If you are on a Win32 system then you can just get the binary
installer and run it and then you'll be all set. If you want to build
it yourself, you can follow the directions below, but see the comments
in setup.py first.
If you are on a Unix/Linux system then keep reading...
The Python Distutils are used to build and install bsddb3, so it is
fairly simple to get things ready to go.
0. Check the patches directory for any updates required for the
version of the Berkeley DB library that you have. If a patch(s)
are indicated in the README then apply it to your Berkeley DB
sources and rebuild it.
1. First, make sure that you have a Berkeley DB version >= 4.1 and
no later than 4.8 and that it is built and installed. Setup.py will
detect a db3 or Berkeley DB directory under either /usr/local or /usr
in that order; this will catch installations from RPMs and most hand
installations under Unix. If setup.py can't find your libdb then you
can give it a hint either in the environment (using the BERKELEYDB_DIR
environment variable) or on the command line by specifying the
directory containing the include and lib directory. For example:
python setup.py --berkeley-db=/stuff/BerkeleyDB.4.8 build
If your Berkeley DB was built as a shared library, and if that
shared library is not on the runtime load path, then you can
specify the additional linker flags needed to find the shared
library on the command line as well. For example:
--lflags="-Xlinker -rpath -Xlinker /stuff/BerkeleyDB.4.8/lib"
or perhaps just
--lflags="-R /stuff/BerkeleyDB.4.8/lib"
Check your compiler and linker documentation to be sure.
It is also possible to specify linking against a different library
with the --libs switch:
--libs="-ldb3"
--libs="-ldb3 -lnsl"
On some OSes distutils may not always use the correct compiler or
linker flags. One user reported having to add the "-lpthread" option
in order to link with Berkeley DB that was compiled with threads on AIX.
NOTE: My recommendation is to not rely on pre-built versions of
Berkeley DB since on some systems there can be several versions
already installed and it's sometimes difficult to tell which you
are linking with when building bsddb3. Instead get the sources
from http://www.sleepycat.com/ and build/install it yourself as a
static library and let setup.py find it in /usr/local. It's not
such a big library that you have to worry about wasting space by
not dynamically linking and doing it this way will possibly save
you some gray hairs.
2. From the main bsddb3 distribution directory run this command, (plus
any extra flags needed as discussed above):
python setup.py build
If your Python was built with the old bsddb module built-in
(statically linked) then the setup script will complain and you'll
have to type "yes" to build anything. Please see the note below
about remedying this.
3. To run the test suite, run the following command:
python test.py
If you would like to see some verbose output from the tests simply
add a -v option. A second -v provides even more verbose output.
The test.py driver script provides lots of options for debugging,
running individual tests, etc. Do "python test.py -h" for details.
4. To install the extension module and the Python modules in the
bsddb3 package, run this command as the root user:
python setup.py install
That's it!
Developer Information
---------------------
Both the Python and C source code is now shared with the Python
project. If you're checking the code out from Subversion, you'll need to run
the getsvn.sh script to get a copy of the code. How you run this
depends on whether you have write access to the Python Subversion or not
(most people do not -- you would know if you do).
To check the code out, do the following:
% ./getsvn.sh anon
This will do an anonymous checkout of the code. To do an
authenticated (via ssh) checkout, do the following:
% ./getsvn.sh
This will check out an extsrc directory and a bsddb directory. There
is one caveat: you'll find that extsrc will become populated with
every C file in Python's Modules directory. You should just ignore this.
-- Robin
robin@alldunn.com
-- [later updates by] Gregory P. Smith
greg@krypto.org
-- [even later updates by] Barry A. Warsaw
barry@python.org
Got questions? email pybsddb-users@lists.sf.net
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:bsddb3-4.8.2.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
bsddb3-4.8.2.tar.gz (87个子文件)
bsddb3-4.8.2
MANIFEST.in 610B
PKG-INFO 2KB
test-full_prerelease.py 1KB
README.txt 6KB
test3.py 20KB
setup3.py 14KB
docs
README.txt 479B
Lib
bsddb
test_support.py 2KB
db.py 3KB
test
test_misc.py 4KB
test_dbshelve.py 11KB
test_dbobj.py 2KB
test_cursor_pget_bug.py 2KB
test_basics.py 36KB
test_join.py 3KB
test_recno.py 8KB
test_replication.py 17KB
test_compat.py 4KB
test_db.py 5KB
test_all.py 17KB
test_dbenv.py 11KB
test_lock.py 6KB
__init__.py 0B
test_thread.py 16KB
test_associate.py 15KB
test_distributed_transactions.py 5KB
test_compare.py 9KB
test_early_close.py 6KB
test_dbtables.py 15KB
test_fileid.py 2KB
test_queue.py 4KB
test_get_none.py 2KB
test_sequence.py 5KB
test_pickle.py 2KB
dbshelve.py 11KB
dbrecio.py 5KB
__init__.py 15KB
dbutils.py 3KB
dbobj.py 11KB
dbtables.py 30KB
test.py 268B
Lib3
bsddb
test_support.py 2KB
db.py 3KB
test
test_misc.py 4KB
test_dbshelve.py 11KB
test_dbobj.py 2KB
test_cursor_pget_bug.py 2KB
test_basics.py 36KB
test_join.py 3KB
test_recno.py 8KB
test_replication.py 17KB
test_compat.py 4KB
test_db.py 5KB
test_all.py 17KB
test_dbenv.py 11KB
test_lock.py 6KB
__init__.py 0B
test_thread.py 16KB
test_associate.py 15KB
test_distributed_transactions.py 5KB
test_compare.py 9KB
test_early_close.py 6KB
test_dbtables.py 15KB
test_fileid.py 2KB
test_queue.py 4KB
test_get_none.py 2KB
test_sequence.py 5KB
test_pickle.py 2KB
dbshelve.py 11KB
dbrecio.py 5KB
__init__.py 15KB
dbutils.py 3KB
dbobj.py 11KB
dbtables.py 30KB
bsddb3.egg-info
PKG-INFO 2KB
SOURCES.txt 2KB
top_level.txt 20B
dependency_links.txt 1B
setup.cfg 88B
TODO.txt 6KB
setup2.py 14KB
setup.py 121B
Modules
bsddb.h 9KB
_bsddb.c 240KB
ChangeLog 26KB
test2.py 20KB
make3.py 1KB
共 87 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功