]> git.pld-linux.org Git - packages/python-pymongo.git/blame - python-pymongo.spec
- python versions (2.4 is upstream minimum, 3.2 minimum python3 supported by our...
[packages/python-pymongo.git] / python-pymongo.spec
CommitLineData
29da83ef
JK
1#
2# Conditional build:
5b0859e8
JK
3%bcond_without python2 # Python 2.x module
4%bcond_without python3 # Python 3.x module
29da83ef
JK
5%bcond_with tests # run tests (seem broken)
6
7%define module pymongo
8Summary: Python driver for MongoDB
9Summary(pl.UTF-8): Sterownik Pythona do MongoDB
10Name: python-%{module}
e008cdfb
MM
11Version: 2.7.1
12Release: 1
29da83ef
JK
13License: Apache v2.0
14Group: Development/Languages/Python
e008cdfb
MM
15Source0: https://pypi.python.org/packages/source/p/pymongo/pymongo-%{version}.tar.gz
16# Source0-md5: 4e4c75e5362f422edb47d27ea6d17a96
29da83ef 17URL: http://api.mongodb.org/python/current/
5b0859e8 18%if %{with python2}
8b909a84 19BuildRequires: python-devel >= 2.4
29da83ef 20BuildRequires: python-distribute
5b0859e8
JK
21%endif
22%if %{with python3}
8b909a84
JB
23BuildRequires: python3-2to3 >= 3.2
24BuildRequires: python3-devel >= 3.2
5b0859e8
JK
25BuildRequires: python3-distribute
26%endif
29da83ef 27BuildRequires: rpm-pythonprov
ab0dd126 28BuildRequires: rpmbuild(macros) >= 1.219
29da83ef
JK
29Requires: python-libs
30Requires: python-modules
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34The PyMongo distribution contains tools for interacting with MongoDB
35database from Python. The bson package is an implementation of the
36BSON format for Python. The pymongo package is a native Python driver
37for MongoDB. The gridfs package is a gridfs implementation on top of
38pymongo.
39
ab0dd126
JB
40%description -l pl.UTF-8
41Dystrybucja PyMongo zawiera narzędzia do współpracy z bazą danych
42MongoDB z poziomu Pythona. Pakiet bson to implementacja formatu BSON
43dla Pythona. Pakiet pymongo to natywny sterownik Pythona dla MongoDB.
44Pakiet gridfs to implementacja gridfs w oparciu o pymongo.
45
5b0859e8
JK
46%package -n python3-%{module}
47Summary: Python driver for MongoDB
48Summary(pl.UTF-8): Sterownik Pythona do MongoDB
49Group: Development/Languages/Python
50Requires: python3-libs
51Requires: python3-modules
52
53%description -n python3-%{module}
54The PyMongo distribution contains tools for interacting with MongoDB
55database from Python. The bson package is an implementation of the
56BSON format for Python. The pymongo package is a native Python driver
57for MongoDB. The gridfs package is a gridfs implementation on top of
58pymongo.
59
60%description -n python3-%{module} -l pl.UTF-8
61Dystrybucja PyMongo zawiera narzędzia do współpracy z bazą danych
62MongoDB z poziomu Pythona. Pakiet bson to implementacja formatu BSON
63dla Pythona. Pakiet pymongo to natywny sterownik Pythona dla MongoDB.
64Pakiet gridfs to implementacja gridfs w oparciu o pymongo.
65
29da83ef
JK
66%prep
67%setup -q -n %{module}-%{version}
68
69%build
5b0859e8 70%if %{with python2}
29da83ef
JK
71CC="%{__cc}" \
72CFLAGS="%{rpmcflags}" \
5b0859e8
JK
73%{__python} setup.py build --build-base build-2 %{?with_tests:test}
74%endif
29da83ef 75
5b0859e8
JK
76%if %{with python3}
77CC="%{__cc}" \
78CFLAGS="%{rpmcflags}" \
79%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
80%endif
29da83ef
JK
81
82%install
83rm -rf $RPM_BUILD_ROOT
5b0859e8
JK
84
85%if %{with python2}
86%{__python} setup.py \
87 build --build-base build-2 \
88 install \
29da83ef
JK
89 --skip-build \
90 --optimize=2 \
91 --root=$RPM_BUILD_ROOT
92
ab0dd126 93%py_postclean
5b0859e8
JK
94%endif
95
96%if %{with python3}
97%{__python3} setup.py \
98 build --build-base build-3 \
99 install \
100 --skip-build \
101 --optimize=2 \
102 --root=$RPM_BUILD_ROOT
103%endif
29da83ef
JK
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
5b0859e8 108%if %{with python2}
29da83ef
JK
109%files
110%defattr(644,root,root,755)
ab0dd126 111%doc README.rst doc/api doc/examples doc/*.rst
29da83ef 112%dir %{py_sitedir}/bson
ab0dd126
JB
113%{py_sitedir}/bson/*.py[co]
114%attr(755,root,root) %{py_sitedir}/bson/_cbson.so
29da83ef 115%dir %{py_sitedir}/gridfs
ab0dd126 116%{py_sitedir}/gridfs/*.py[co]
29da83ef 117%dir %{py_sitedir}/pymongo
ab0dd126
JB
118%{py_sitedir}/pymongo/*.py[co]
119%attr(755,root,root) %{py_sitedir}/pymongo/_cmessage.so
120%{py_sitedir}/pymongo-%{version}-py*.egg-info
5b0859e8
JK
121%endif
122
123%if %{with python3}
124%files -n python3-%{module}
125%defattr(644,root,root,755)
126%doc README.rst doc/api doc/examples doc/*.rst
127%dir %{py3_sitedir}/bson
128%{py3_sitedir}/bson/*.py
129%{py3_sitedir}/bson/__pycache__
130%attr(755,root,root) %{py3_sitedir}/bson/_cbson.*.so
131%dir %{py3_sitedir}/gridfs
132%{py3_sitedir}/gridfs/*.py
133%{py3_sitedir}/gridfs/__pycache__
134%dir %{py3_sitedir}/pymongo
135%{py3_sitedir}/pymongo/*.py
136%{py3_sitedir}/pymongo/__pycache__
137%attr(755,root,root) %{py3_sitedir}/pymongo/_cmessage.*.so
138%{py3_sitedir}/pymongo-%{version}-py*.egg-info
139%endif
This page took 0.12481 seconds and 4 git commands to generate.