]>
Commit | Line | Data |
---|---|---|
4fd395e9 AF |
1 | %bcond_without python2 |
2 | %bcond_without python3 | |
3 | # | |
a35617ce | 4 | %define pname bsddb3 |
fcf78bce | 5 | %define module bsddb |
90913fba | 6 | Summary: Python interface for BerkeleyDB |
2a4776ae | 7 | Summary(pl.UTF-8): Interfejs Pythona do BerkeleyDB |
fcf78bce | 8 | Name: python-%{module} |
bdf70982 | 9 | Version: 6.2.6 |
1e6ed146 | 10 | Release: 7 |
d5e5d608 | 11 | License: BSD-like w/o adv. clause |
10fd7dfd | 12 | Group: Development/Languages/Python |
fcf78bce | 13 | Source0: http://pypi.python.org/packages/source/b/bsddb3/%{pname}-%{version}.tar.gz |
bdf70982 | 14 | # Source0-md5: ebb7554bbe1a518abbe742753a617577 |
d300f666 | 15 | Patch0: x32.patch |
14516c3d | 16 | URL: http://www.argo.es/~jcea/programacion/pybsddb.htm |
192bceba | 17 | BuildRequires: db-devel >= 4.1.25 |
4fd395e9 | 18 | %if %{with python2} |
14516c3d | 19 | BuildRequires: python-devel >= 1:2.3 |
4506b3cd | 20 | BuildRequires: python-modules |
4fd395e9 AF |
21 | %endif |
22 | %if %{with python3} | |
2c3de492 | 23 | BuildRequires: python3 |
4fd395e9 | 24 | BuildRequires: python3-devel |
2c3de492 | 25 | BuildRequires: python3-modules |
4fd395e9 | 26 | %endif |
4506b3cd | 27 | BuildRequires: rpm-pythonprov |
7facf3ec | 28 | BuildRequires: rpmbuild(macros) >= 1.710 |
855351fc | 29 | %pyrequires_eq python-modules |
a39c8df0 JB |
30 | Obsoletes: bsddb3 |
31 | Obsoletes: python-bsddb3 | |
10fd7dfd | 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 | ||
f8448c35 JR |
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. | |
10fd7dfd | 52 | |
4fd395e9 AF |
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 | ||
10fd7dfd | 77 | %prep |
78 | %setup -q -n %{pname}-%{version} | |
d300f666 | 79 | %patch0 -p1 |
10fd7dfd | 80 | |
81 | %build | |
4fd395e9 | 82 | %if %{with python2} |
ab210708 | 83 | env %py_build \ |
4fd395e9 AF |
84 | --berkeley-db-libdir=%{_libdir} \ |
85 | --berkeley-db=%{_prefix} | |
86 | %endif | |
87 | ||
88 | %if %{with python3} | |
ab210708 | 89 | env %py3_build \ |
14516c3d | 90 | --berkeley-db-libdir=%{_libdir} \ |
4fd395e9 AF |
91 | --berkeley-db=%{_prefix} |
92 | %endif | |
10fd7dfd | 93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
4fd395e9 AF |
96 | |
97 | %if %{with python2} | |
ab210708 | 98 | %py_install \ |
10fd7dfd | 99 | |
d1257462 ER |
100 | %py_postclean |
101 | ||
102 | # do not include in main package tests and devel headers | |
2d781b5f | 103 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/bsddb3/tests |
2d781b5f | 104 | %{__rm} -r $RPM_BUILD_ROOT%{py_incdir}/bsddb3/bsddb.h |
4fd395e9 AF |
105 | %endif |
106 | ||
107 | %if %{with python3} | |
ab210708 | 108 | %py3_install \ |
4fd395e9 | 109 | |
4fd395e9 | 110 | # do not include in main package tests and devel headers |
2d781b5f | 111 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/bsddb3/tests |
2d781b5f | 112 | %{__rm} -r $RPM_BUILD_ROOT%{py3_incdir}/bsddb3/bsddb.h |
4fd395e9 AF |
113 | %endif |
114 | ||
10fd7dfd | 115 | |
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
4fd395e9 | 119 | %if %{with python2} |
fb316b05 | 120 | %files |
10fd7dfd | 121 | %defattr(644,root,root,755) |
d1257462 | 122 | %doc *.txt |
10fd7dfd | 123 | %dir %{py_sitedir}/bsddb3 |
14516c3d | 124 | %{py_sitedir}/bsddb3/*.py[co] |
10fd7dfd | 125 | %attr(755,root,root) %{py_sitedir}/bsddb3/*.so |
d24b39d0 | 126 | %if "%{py_ver}" > "2.4" |
127 | %{py_sitedir}/bsddb3-*.egg-info | |
128 | %endif | |
4fd395e9 AF |
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 | |
9559bf82 JK |
137 | %{py3_sitedir}/bsddb3/*.py |
138 | %{py3_sitedir}/bsddb3/__pycache__ | |
4fd395e9 AF |
139 | %attr(755,root,root) %{py3_sitedir}/bsddb3/*.so |
140 | %endif |