]> git.pld-linux.org Git - SPECS.git/blob - python-whoosh.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-whoosh.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
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
10 Summary(pl.UTF-8):      Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni
11 Name:           python-%{module}
12 Version:        2.7.4
13 Release:        5
14 License:        BSD
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/Whoosh/
17 Source0:        https://files.pythonhosted.org/packages/source/W/Whoosh/Whoosh-%{version}.tar.gz
18 # Source0-md5:  c2710105f20b3e29936bd2357383c325
19 Patch0:         %{name}-tests.patch
20 URL:            https://pypi.org/project/Whoosh/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.5
25 BuildRequires:  python-setuptools
26 %if %{with tests}
27 BuildRequires:  python3-pytest >= 3.0.0
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.2
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-pytest >= 3.0.0
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
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
57 %package -n python3-%{module}
58 Summary:        Fast, Python3 full text indexing, search, and spell checking library
59 Summary(pl.UTF-8):      Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni
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
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
76 %package apidocs
77 Summary:        API documentation for Whoosh module
78 Summary(pl.UTF-8):      Dokumentacja API modułu Whoosh
79 Group:          Documentation
80
81 %description apidocs
82 API documentation for Whoosh module.
83
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API modułu Whoosh.
86
87 %prep
88 %setup -q -n Whoosh-%{version}
89 %patch0 -p1
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
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 %if %{with python2}
108 %py_install
109
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)
139 %doc docs/html/{_static,api,releases,tech,*.html,*.js}
140 %endif
This page took 0.918181 seconds and 3 git commands to generate.