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