]>
Commit | Line | Data |
---|---|---|
dde642e5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests (require en_US dictionary) | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Spellchecking library for Python 2 | |
8 | Summary(pl.UTF-8): Biblioteka Pythona 2 sprawdzająca pisownię | |
9 | Name: python-pyenchant | |
10 | Version: 2.0.0 | |
78553e4d | 11 | Release: 5 |
e94c4e84 | 12 | License: LGPL v2.1+ |
dde642e5 JB |
13 | Group: Libraries/Python |
14 | #Source0Download: https://pypi.org/simple/pyenchant/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{version}.tar.gz | |
16 | # Source0-md5: c224ea53e119b04116d5301e5027051c | |
17 | URL: https://pypi.org/project/pyenchant/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-devel >= 1:2.5 | |
20 | BuildRequires: python-setuptools >= 1:7 | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-2to3 >= 1:3.2 | |
24 | BuildRequires: python3-devel >= 1:3.2 | |
25 | BuildRequires: python3-setuptools >= 1:7 | |
26 | %endif | |
7b2aaf41 | 27 | BuildRequires: rpm-pythonprov |
dde642e5 JB |
28 | BuildRequires: rpmbuild(macros) >= 1.714 |
29 | Requires: enchant >= 1.6.0 | |
30 | Requires: python-libs >= 1:2.5 | |
31 | BuildArch: noarch | |
7b2aaf41 | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | PyEnchant is a set of language bindings and some wrapper classes to | |
36 | make the excellent Enchant spellchecker available as a Python module. | |
37 | ||
bc7d51f2 JR |
38 | %description -l pl.UTF-8 |
39 | PyEnchant to zbiór dowiązań języka i klas obudowujących | |
40 | udostępniających świetną bibliotekę sprawdzania pisowni Enchant jako | |
41 | moduł Pythona. | |
af14651e | 42 | |
dde642e5 JB |
43 | %package -n python3-pyenchant |
44 | Summary: Spellchecking library for Python 3 | |
45 | Summary(pl.UTF-8): Biblioteka Pythona 3 sprawdzająca pisownię | |
46 | Group: Libraries/Python | |
47 | Requires: enchant >= 1.6.0 | |
48 | Requires: python3-libs >= 1:3.2 | |
49 | ||
50 | %description -n python3-pyenchant | |
51 | PyEnchant is a set of language bindings and some wrapper classes to | |
52 | make the excellent Enchant spellchecker available as a Python module. | |
53 | ||
54 | %description -n python3-pyenchant -l pl.UTF-8 | |
55 | PyEnchant to zbiór dowiązań języka i klas obudowujących | |
56 | udostępniających świetną bibliotekę sprawdzania pisowni Enchant jako | |
57 | moduł Pythona. | |
58 | ||
7b2aaf41 | 59 | %prep |
dde642e5 | 60 | %setup -q -n pyenchant-%{version} |
7b2aaf41 | 61 | |
62 | %build | |
dde642e5 JB |
63 | %if %{with python2} |
64 | %py_build %{?with_tests:test} | |
65 | %endif | |
66 | ||
67 | %if %{with python3} | |
68 | %py3_build %{?with_tests:test} | |
69 | %endif | |
7b2aaf41 | 70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
dde642e5 JB |
74 | %if %{with python2} |
75 | %py_install | |
7b2aaf41 | 76 | |
4517f318 | 77 | %py_postclean |
dde642e5 JB |
78 | %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/enchant/tests.py* |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %py3_install | |
83 | ||
84 | %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enchant/tests.py | |
85 | %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enchant/__pycache__/tests.*.py* | |
86 | %endif | |
7b2aaf41 | 87 | |
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
dde642e5 | 91 | %if %{with python2} |
7b2aaf41 | 92 | %files |
93 | %defattr(644,root,root,755) | |
4517f318 | 94 | %doc README.txt TODO.txt |
dde642e5 | 95 | %{py_sitescriptdir}/enchant |
4517f318 | 96 | %{py_sitescriptdir}/pyenchant-%{version}-py*.egg-info |
dde642e5 JB |
97 | %endif |
98 | ||
99 | %if %{with python3} | |
100 | %files -n python3-pyenchant | |
101 | %defattr(644,root,root,755) | |
102 | %doc README.txt TODO.txt | |
103 | %{py3_sitescriptdir}/enchant | |
104 | %{py3_sitescriptdir}/pyenchant-%{version}-py*.egg-info | |
105 | %endif |