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