]> git.pld-linux.org Git - packages/python-pymongo.git/blame - python-pymongo.spec
Up to 2.7.1
[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}
29da83ef
JK
19BuildRequires: python-devel
20BuildRequires: python-distribute
5b0859e8
JK
21%endif
22%if %{with python3}
23BuildRequires: python3-2to3
24BuildRequires: python3-devel
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
66
29da83ef
JK
67%prep
68%setup -q -n %{module}-%{version}
69
70%build
5b0859e8 71%if %{with python2}
29da83ef
JK
72CC="%{__cc}" \
73CFLAGS="%{rpmcflags}" \
5b0859e8
JK
74%{__python} setup.py build --build-base build-2 %{?with_tests:test}
75%endif
29da83ef 76
5b0859e8
JK
77%if %{with python3}
78CC="%{__cc}" \
79CFLAGS="%{rpmcflags}" \
80%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
81%endif
29da83ef
JK
82
83%install
84rm -rf $RPM_BUILD_ROOT
5b0859e8
JK
85
86%if %{with python2}
87%{__python} setup.py \
88 build --build-base build-2 \
89 install \
29da83ef
JK
90 --skip-build \
91 --optimize=2 \
92 --root=$RPM_BUILD_ROOT
93
ab0dd126 94%py_postclean
5b0859e8
JK
95%endif
96
97%if %{with python3}
98%{__python3} setup.py \
99 build --build-base build-3 \
100 install \
101 --skip-build \
102 --optimize=2 \
103 --root=$RPM_BUILD_ROOT
104%endif
29da83ef
JK
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
5b0859e8 109%if %{with python2}
29da83ef
JK
110%files
111%defattr(644,root,root,755)
ab0dd126 112%doc README.rst doc/api doc/examples doc/*.rst
29da83ef 113%dir %{py_sitedir}/bson
ab0dd126
JB
114%{py_sitedir}/bson/*.py[co]
115%attr(755,root,root) %{py_sitedir}/bson/_cbson.so
29da83ef 116%dir %{py_sitedir}/gridfs
ab0dd126 117%{py_sitedir}/gridfs/*.py[co]
29da83ef 118%dir %{py_sitedir}/pymongo
ab0dd126
JB
119%{py_sitedir}/pymongo/*.py[co]
120%attr(755,root,root) %{py_sitedir}/pymongo/_cmessage.so
121%{py_sitedir}/pymongo-%{version}-py*.egg-info
5b0859e8
JK
122%endif
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
127%doc README.rst doc/api doc/examples doc/*.rst
128%dir %{py3_sitedir}/bson
129%{py3_sitedir}/bson/*.py
130%{py3_sitedir}/bson/__pycache__
131%attr(755,root,root) %{py3_sitedir}/bson/_cbson.*.so
132%dir %{py3_sitedir}/gridfs
133%{py3_sitedir}/gridfs/*.py
134%{py3_sitedir}/gridfs/__pycache__
135%dir %{py3_sitedir}/pymongo
136%{py3_sitedir}/pymongo/*.py
137%{py3_sitedir}/pymongo/__pycache__
138%attr(755,root,root) %{py3_sitedir}/pymongo/_cmessage.*.so
139%{py3_sitedir}/pymongo-%{version}-py*.egg-info
140%endif
This page took 0.152892 seconds and 4 git commands to generate.