]> git.pld-linux.org Git - packages/python-bsddb.git/blame - python-bsddb.spec
rebuild with python 3.10
[packages/python-bsddb.git] / python-bsddb.spec
CommitLineData
4fd395e9
AF
1%bcond_without python2
2%bcond_without python3
3#
a35617ce 4%define pname bsddb3
fcf78bce 5%define module bsddb
90913fba 6Summary: Python interface for BerkeleyDB
2a4776ae 7Summary(pl.UTF-8): Interfejs Pythona do BerkeleyDB
fcf78bce 8Name: python-%{module}
bdf70982 9Version: 6.2.6
1e6ed146 10Release: 7
d5e5d608 11License: BSD-like w/o adv. clause
10fd7dfd 12Group: Development/Languages/Python
fcf78bce 13Source0: http://pypi.python.org/packages/source/b/bsddb3/%{pname}-%{version}.tar.gz
bdf70982 14# Source0-md5: ebb7554bbe1a518abbe742753a617577
d300f666 15Patch0: x32.patch
14516c3d 16URL: http://www.argo.es/~jcea/programacion/pybsddb.htm
192bceba 17BuildRequires: db-devel >= 4.1.25
4fd395e9 18%if %{with python2}
14516c3d 19BuildRequires: python-devel >= 1:2.3
4506b3cd 20BuildRequires: python-modules
4fd395e9
AF
21%endif
22%if %{with python3}
2c3de492 23BuildRequires: python3
4fd395e9 24BuildRequires: python3-devel
2c3de492 25BuildRequires: python3-modules
4fd395e9 26%endif
4506b3cd 27BuildRequires: rpm-pythonprov
7facf3ec 28BuildRequires: rpmbuild(macros) >= 1.710
855351fc 29%pyrequires_eq python-modules
a39c8df0
JB
30Obsoletes: bsddb3
31Obsoletes: python-bsddb3
10fd7dfd 32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35This module provides a nearly complete wrapping of the Sleepycat C API
36for the Database Environment, Database, Cursor, and Transaction
37objects, and each of these is exposed as a Python Type in the
38bsddb3.db module. The databse objects can use various access methods:
39btree, hash, recno, and queue. For the first time all of these are
40fully supported in the Python wrappers. Please see the documents in
41the docs directory of the source distribution or at the website for
42more details on the types and methods provided.
43
f8448c35
JR
44%description -l pl.UTF-8
45Ten moduł dostarcza prawie całkowite opakowanie API C Sleepycat do
46obiektów środowiska baz danych, baz danych, kursorów i transakcji, z
47których każdy jest udostępniony jako pythonowy typ w module bsddb3.db.
48Obiekty bazy danych mogą używać różnych metod dostępu: btree, hash,
49recno i queue. Jest to pierwsza implementacja obsługi tych obiektów
50dla Pythona. Więcej szczegółów o typach i metodach znajduje się w
51załączonej dokumentacji lub na stronie WWW.
10fd7dfd 52
4fd395e9
AF
53%package -n python3-%{pname}
54Summary: Python interface for BerkeleyDB
55Summary(pl.UTF-8): Interfejs Pythona do BerkeleyDB
56Group: Development/Languages/Python
57
58%description -n python3-%{pname}
59This module provides a nearly complete wrapping of the Oracle C API
60for the Database Environment, Database, Cursor, and Transaction
61objects, and each of these is exposed as a Python Type in the
62bsddb3.db module. The databse objects can use various access methods:
63btree, hash, recno, and queue. For the first time all of these are
64fully supported in the Python wrappers. Please see the documents in
65the docs directory of the source distribution or at the website for
66more details on the types and methods provided.
67
68%description -n python3-%{pname} -l pl.UTF-8
69Ten moduł dostarcza prawie całkowite opakowanie API C Oracle do
70obiektów środowiska baz danych, baz danych, kursorów i transakcji, z
71których każdy jest udostępniony jako pythonowy typ w module bsddb3.db.
72Obiekty bazy danych mogą używać różnych metod dostępu: btree, hash,
73recno i queue. Jest to pierwsza implementacja obsługi tych obiektów
74dla Pythona. Więcej szczegółów o typach i metodach znajduje się w
75załą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 83env %py_build \
4fd395e9
AF
84 --berkeley-db-libdir=%{_libdir} \
85 --berkeley-db=%{_prefix}
86%endif
87
88%if %{with python3}
ab210708 89env %py3_build \
14516c3d 90 --berkeley-db-libdir=%{_libdir} \
4fd395e9
AF
91 --berkeley-db=%{_prefix}
92%endif
10fd7dfd 93
94%install
95rm -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
117rm -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
This page took 0.127014 seconds and 4 git commands to generate.