]> git.pld-linux.org Git - packages/python-bsddb.git/blob - python-bsddb.spec
- release 4 (by relup.sh)
[packages/python-bsddb.git] / python-bsddb.spec
1 %bcond_without  python2
2 %bcond_without  python3
3 #
4 %define         pname   bsddb3
5 %define         module  bsddb
6 Summary:        Python interface for BerkeleyDB
7 Summary(pl.UTF-8):      Interfejs Pythona do BerkeleyDB
8 Name:           python-%{module}
9 Version:        5.3.0
10 Release:        4
11 License:        BSD-like w/o adv. clause
12 Group:          Development/Languages/Python
13 Source0:        http://pypi.python.org/packages/source/b/bsddb3/%{pname}-%{version}.tar.gz
14 # Source0-md5:  d5aa4f293c4ea755e84383537f74be82
15 URL:            http://www.argo.es/~jcea/programacion/pybsddb.htm
16 BuildRequires:  db-devel >= 4.1.25
17 %if %{with python2}
18 BuildRequires:  python-devel >= 1:2.3
19 BuildRequires:  python-modules
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-modules
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.613
28 %pyrequires_eq  python-modules
29 Obsoletes:      bsddb3
30 Obsoletes:      python-bsddb3
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This module provides a nearly complete wrapping of the Sleepycat C API
35 for the Database Environment, Database, Cursor, and Transaction
36 objects, and each of these is exposed as a Python Type in the
37 bsddb3.db module. The databse objects can use various access methods:
38 btree, hash, recno, and queue. For the first time all of these are
39 fully supported in the Python wrappers. Please see the documents in
40 the docs directory of the source distribution or at the website for
41 more details on the types and methods provided.
42
43 %description -l pl.UTF-8
44 Ten moduł dostarcza prawie całkowite opakowanie API C Sleepycat do
45 obiektów środowiska baz danych, baz danych, kursorów i transakcji, z
46 których każdy jest udostępniony jako pythonowy typ w module bsddb3.db.
47 Obiekty bazy danych mogą używać różnych metod dostępu: btree, hash,
48 recno i queue. Jest to pierwsza implementacja obsługi tych obiektów
49 dla Pythona. Więcej szczegółów o typach i metodach znajduje się w
50 załączonej dokumentacji lub na stronie WWW.
51
52 %package -n python3-%{pname}
53 Summary:        Python interface for BerkeleyDB
54 Summary(pl.UTF-8):      Interfejs Pythona do BerkeleyDB
55 Group:          Development/Languages/Python
56
57 %description -n python3-%{pname}
58 This module provides a nearly complete wrapping of the Oracle C API
59 for the Database Environment, Database, Cursor, and Transaction
60 objects, and each of these is exposed as a Python Type in the
61 bsddb3.db module. The databse objects can use various access methods:
62 btree, hash, recno, and queue. For the first time all of these are
63 fully supported in the Python wrappers. Please see the documents in
64 the docs directory of the source distribution or at the website for
65 more details on the types and methods provided.
66
67 %description -n python3-%{pname} -l pl.UTF-8
68 Ten moduł dostarcza prawie całkowite opakowanie API C Oracle do
69 obiektów środowiska baz danych, baz danych, kursorów i transakcji, z
70 których każdy jest udostępniony jako pythonowy typ w module bsddb3.db.
71 Obiekty bazy danych mogą używać różnych metod dostępu: btree, hash,
72 recno i queue. Jest to pierwsza implementacja obsługi tych obiektów
73 dla Pythona. Więcej szczegółów o typach i metodach znajduje się w
74 załączonej dokumentacji lub na stronie WWW.
75
76 %prep
77 %setup -q -n %{pname}-%{version}
78
79 %build
80 %if %{with python2}
81 env CFLAGS="%{rpmcflags}" \
82 %{__python} setup.py build -b build-2 \
83         --berkeley-db-libdir=%{_libdir} \
84         --berkeley-db=%{_prefix}
85 %endif
86
87 %if %{with python3}
88 env CFLAGS="%{rpmcflags}" \
89 %{__python3} setup.py build -b build-3 \
90         --berkeley-db-libdir=%{_libdir} \
91         --berkeley-db=%{_prefix}
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %{__python} setup.py build -b build-2 \
99         install \
100         --root=$RPM_BUILD_ROOT \
101         --optimize=2 \
102
103 %py_postclean
104
105 # do not include in main package tests and devel headers
106 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/bsddb3/tests
107 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/bsddb3/test_support.*
108 %{__rm} -r $RPM_BUILD_ROOT%{py_incdir}/bsddb3/bsddb.h
109 %endif
110
111 %if %{with python3}
112 %{__python3} setup.py build -b build-3 \
113         install \
114         --root=$RPM_BUILD_ROOT \
115         --optimize=2 \
116
117 # do not include in main package tests and devel headers
118 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/bsddb3/tests
119 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/bsddb3/test_support.*
120 %{__rm} -r $RPM_BUILD_ROOT%{py3_incdir}/bsddb3/bsddb.h
121 %endif
122
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %if %{with python2}
128 %files
129 %defattr(644,root,root,755)
130 %doc *.txt
131 %dir %{py_sitedir}/bsddb3
132 %{py_sitedir}/bsddb3/*.py[co]
133 %attr(755,root,root) %{py_sitedir}/bsddb3/*.so
134 %if "%{py_ver}" > "2.4"
135 %{py_sitedir}/bsddb3-*.egg-info
136 %endif
137 %endif
138
139 %if %{with python3}
140 %files -n python3-%{pname}
141 %defattr(644,root,root,755)
142 %doc *.txt docs
143 %dir %{py3_sitedir}/bsddb3
144 %{py3_sitedir}/*.egg-info
145 %{py3_sitedir}/bsddb3/*.py
146 %{py3_sitedir}/bsddb3/__pycache__
147 %attr(755,root,root) %{py3_sitedir}/bsddb3/*.so
148 %endif
This page took 0.178009 seconds and 3 git commands to generate.