]>
Commit | Line | Data |
---|---|---|
728d741c ER |
1 | # |
2 | # Conditional build: | |
10061fe4 JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
728d741c ER |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module whoosh | |
9 | Summary: Fast, pure-Python full text indexing, search, and spell checking library | |
10061fe4 | 10 | Summary(pl.UTF-8): Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni |
728d741c ER |
11 | Name: python-%{module} |
12 | Version: 2.7.4 | |
0a057d53 | 13 | Release: 6 |
728d741c ER |
14 | License: BSD |
15 | Group: Libraries/Python | |
10061fe4 JB |
16 | #Source0Download: https://pypi.org/simple/Whoosh/ |
17 | Source0: https://files.pythonhosted.org/packages/source/W/Whoosh/Whoosh-%{version}.tar.gz | |
728d741c | 18 | # Source0-md5: c2710105f20b3e29936bd2357383c325 |
10061fe4 JB |
19 | Patch0: %{name}-tests.patch |
20 | URL: https://pypi.org/project/Whoosh/ | |
728d741c ER |
21 | BuildRequires: rpm-pythonprov |
22 | BuildRequires: rpmbuild(macros) >= 1.714 | |
23 | %if %{with python2} | |
10061fe4 | 24 | BuildRequires: python-modules >= 1:2.5 |
728d741c ER |
25 | BuildRequires: python-setuptools |
26 | %if %{with tests} | |
10061fe4 | 27 | BuildRequires: python3-pytest >= 3.0.0 |
728d741c ER |
28 | %endif |
29 | %endif | |
30 | %if %{with python3} | |
10061fe4 | 31 | BuildRequires: python3-modules >= 1:3.2 |
728d741c ER |
32 | BuildRequires: python3-setuptools |
33 | %if %{with tests} | |
10061fe4 | 34 | BuildRequires: python3-pytest >= 3.0.0 |
728d741c ER |
35 | %endif |
36 | %endif | |
37 | %if %{with doc} | |
38 | BuildRequires: sphinx-pdg-2 | |
39 | %endif | |
40 | BuildArch: noarch | |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %description | |
44 | Whoosh is a fast, featureful full-text indexing and searching library | |
45 | implemented in pure Python. Programmers can use it to easily add | |
46 | search functionality to their applications and websites. Every part of | |
47 | how Whoosh works can be extended or replaced to meet your needs | |
48 | exactly. | |
49 | ||
10061fe4 JB |
50 | %description -l pl.UTF-8 |
51 | Whoosh to szybka biblioteka pełnotekstowego indeksowania i | |
52 | wyszukiwania, zaimplementowana w czystym Pythonie. Programiści mogą | |
53 | łatwo używać jej do rozszerzania funkcjonalności w swoich aplikacjach | |
54 | i serwisach. Każda część funkcjonalności Whoosha może być rozszerzona | |
55 | lub podmieniona w celu dostosowania do własnych potrzeb. | |
56 | ||
728d741c ER |
57 | %package -n python3-%{module} |
58 | Summary: Fast, Python3 full text indexing, search, and spell checking library | |
10061fe4 | 59 | Summary(pl.UTF-8): Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni |
728d741c ER |
60 | Group: Libraries/Python |
61 | ||
62 | %description -n python3-%{module} | |
63 | Whoosh is a fast, featureful full-text indexing and searching library | |
64 | implemented in pure Python. Programmers can use it to easily add | |
65 | search functionality to their applications and websites. Every part of | |
66 | how Whoosh works can be extended or replaced to meet your needs | |
67 | exactly. | |
68 | ||
10061fe4 JB |
69 | %description -n python3-%{module} -l pl.UTF-8 |
70 | Whoosh to szybka biblioteka pełnotekstowego indeksowania i | |
71 | wyszukiwania, zaimplementowana w czystym Pythonie. Programiści mogą | |
72 | łatwo używać jej do rozszerzania funkcjonalności w swoich aplikacjach | |
73 | i serwisach. Każda część funkcjonalności Whoosha może być rozszerzona | |
74 | lub podmieniona w celu dostosowania do własnych potrzeb. | |
75 | ||
728d741c | 76 | %package apidocs |
10061fe4 JB |
77 | Summary: API documentation for Whoosh module |
78 | Summary(pl.UTF-8): Dokumentacja API modułu Whoosh | |
728d741c ER |
79 | Group: Documentation |
80 | ||
81 | %description apidocs | |
10061fe4 | 82 | API documentation for Whoosh module. |
728d741c ER |
83 | |
84 | %description apidocs -l pl.UTF-8 | |
10061fe4 | 85 | Dokumentacja API modułu Whoosh. |
728d741c ER |
86 | |
87 | %prep | |
88 | %setup -q -n Whoosh-%{version} | |
10061fe4 | 89 | %patch0 -p1 |
728d741c ER |
90 | |
91 | %build | |
92 | %if %{with python2} | |
93 | %py_build %{?with_tests:test} | |
94 | %endif | |
95 | ||
96 | %if %{with python3} | |
97 | %py3_build %{?with_tests:test} | |
98 | %endif | |
99 | ||
100 | %if %{with doc} | |
101 | sphinx-build-2 docs/source docs/html | |
728d741c ER |
102 | %endif |
103 | ||
104 | %install | |
105 | rm -rf $RPM_BUILD_ROOT | |
10061fe4 | 106 | |
728d741c ER |
107 | %if %{with python2} |
108 | %py_install | |
10061fe4 | 109 | |
728d741c ER |
110 | %py_postclean |
111 | %endif | |
112 | ||
113 | %if %{with python3} | |
114 | %py3_install | |
115 | %endif | |
116 | ||
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %if %{with python3} | |
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %doc README.txt LICENSE.txt | |
124 | %{py_sitescriptdir}/%{module} | |
125 | %{py_sitescriptdir}/Whoosh-%{version}-py*.egg-info | |
126 | %endif | |
127 | ||
128 | %if %{with python3} | |
129 | %files -n python3-%{module} | |
130 | %defattr(644,root,root,755) | |
131 | %doc README.txt LICENSE.txt | |
132 | %{py3_sitescriptdir}/%{module} | |
133 | %{py3_sitescriptdir}/Whoosh-%{version}-py*.egg-info | |
134 | %endif | |
135 | ||
136 | %if %{with doc} | |
137 | %files apidocs | |
138 | %defattr(644,root,root,755) | |
10061fe4 | 139 | %doc docs/html/{_static,api,releases,tech,*.html,*.js} |
728d741c | 140 | %endif |