]>
Commit | Line | Data |
---|---|---|
29da83ef JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # run tests (seem broken) | |
4 | ||
5 | %define module pymongo | |
6 | Summary: Python driver for MongoDB | |
7 | Summary(pl.UTF-8): Sterownik Pythona do MongoDB | |
8 | Name: python-%{module} | |
9 | Version: 2.2 | |
10 | Release: 1 | |
11 | License: Apache v2.0 | |
12 | Group: Development/Languages/Python | |
13 | Source0: http://pypi.python.org/packages/source/p/pymongo/%{module}-%{version}.tar.gz | |
14 | # Source0-md5: 101dd4ae59bdd487f67b3a3968a82c8c | |
15 | URL: http://api.mongodb.org/python/current/ | |
16 | BuildRequires: python-devel | |
17 | BuildRequires: python-distribute | |
18 | BuildRequires: rpm-pythonprov | |
19 | Requires: python-libs | |
20 | Requires: python-modules | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | The PyMongo distribution contains tools for interacting with MongoDB | |
25 | database from Python. The bson package is an implementation of the | |
26 | BSON format for Python. The pymongo package is a native Python driver | |
27 | for MongoDB. The gridfs package is a gridfs implementation on top of | |
28 | pymongo. | |
29 | ||
30 | %prep | |
31 | %setup -q -n %{module}-%{version} | |
32 | ||
33 | %build | |
34 | CC="%{__cc}" \ | |
35 | CFLAGS="%{rpmcflags}" \ | |
36 | %{__python} setup.py build | |
37 | ||
38 | %{?with_tests:%{__python} setup.py test} | |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | %{__python} setup.py install \ | |
43 | --skip-build \ | |
44 | --optimize=2 \ | |
45 | --root=$RPM_BUILD_ROOT | |
46 | ||
47 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
48 | ||
49 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
50 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %doc README.rst PKG-INFO doc/api doc/examples doc/*.rst | |
58 | %dir %{py_sitedir}/bson | |
59 | %{py_sitedir}/bson/*.py* | |
60 | %attr(755,root,root) %{py_sitedir}/bson/*.so | |
61 | %dir %{py_sitedir}/gridfs | |
62 | %{py_sitedir}/gridfs/*.py* | |
63 | %dir %{py_sitedir}/pymongo | |
64 | %{py_sitedir}/pymongo/*.py* | |
65 | %attr(755,root,root) %{py_sitedir}/pymongo/*.so | |
66 | %{py_sitedir}/*-*.egg-info |