1 |
steen |
1.1 |
### RPM external python-tdb 0.0.6
|
2 |
|
|
%define pythonv %(echo $PYTHON_VERSION | cut -d. -f 1,2)
|
3 |
|
|
%define pydir %(which python| python -c "import sys,os; version=sys.version[:3];path='/'+reduce(lambda x,y: x+y+'/',sys.stdin.readline().split('/')[:-2]);print path")
|
4 |
|
|
%define bindir %pydir/bin
|
5 |
|
|
%define sitedir %pydir/lib/python%pythonv/site-packages/
|
6 |
|
|
# INITENV +PATH PYTHONPATH %{i}/lib
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
Summary: Python binding for the Samba Trivial Database
|
10 |
|
|
Packager:Conrad Steenberg <conrad@hep.caltech.edu>
|
11 |
|
|
Vendor: Conrad Steenberg <conrad@hep.caltech.edu>
|
12 |
|
|
|
13 |
|
|
Source: http://julian.ultralight.org/clarens/devel/%n-%v.tar.gz
|
14 |
|
|
Requires: python tdb Pyrex
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
%description
|
18 |
|
|
|
19 |
|
|
A Python binding for TDB. TDB is a Trivial Database. In concept, it is very
|
20 |
|
|
much like GDBM, and BSD's DB except that it allows multiple simultaneous
|
21 |
|
|
writers and uses locking internally to keep writers from trampling on each
|
22 |
|
|
other. TDB is also extremely small.
|
23 |
|
|
|
24 |
|
|
This binding exposes a low-level TDB interface class, as well as a dictionary
|
25 |
|
|
(mapping) class.
|
26 |
|
|
|
27 |
|
|
%prep
|
28 |
|
|
%setup -n %n-%v
|
29 |
|
|
|
30 |
|
|
%build
|
31 |
|
|
mkdir build
|
32 |
|
|
|
33 |
|
|
%install
|
34 |
|
|
set
|
35 |
|
|
export CFLAGS="-I$TDB_ROOT/include"
|
36 |
|
|
export LDFLAGS="-L$TDB_ROOT/lib"
|
37 |
|
|
python setup.py --build --prefix=%{i} --install --root=/
|
38 |
|
|
|
39 |
|
|
mkdir -p %i/lib
|
40 |
|
|
mv %sitedir/tdb.so %i/lib
|
41 |
|
|
|
42 |
|
|
%files
|
43 |
|
|
%i
|