]>
Commit | Line | Data |
---|---|---|
c6c6bfd7 MK |
1 | # |
2 | # Conditional build: | |
c6c6bfd7 | 3 | %bcond_without python2 # CPython 2.x module |
2fc57f59 | 4 | %bcond_without python3 # CPython 3.x module |
c6c6bfd7 MK |
5 | |
6 | %define module hunspell | |
632dbe71 JB |
7 | Summary: Pyhunspell - Python 2.x bindings for the Hunspell spellchecker engine |
8 | Summary(pl.UTF-8): Pyhunspell - wiązania Pythona 2.x do silnika sprawdzania pisowni Hunspell | |
c6c6bfd7 | 9 | Name: python-%{module} |
59c75a23 | 10 | Version: 0.4.1 |
5a13da1c | 11 | Release: 2 |
59c75a23 | 12 | License: GPL v3+ |
c6c6bfd7 | 13 | Group: Libraries/Python |
59c75a23 | 14 | #Source0Download: https://pypi.python.org/simple/hunspell/ |
c6c2eaa1 | 15 | Source0: https://pypi.python.org/packages/source/h/hunspell/hunspell-%{version}.tar.gz |
59c75a23 | 16 | # Source0-md5: d8b69c71a1e4d9a74c00972f76ea06bc |
c6c6bfd7 | 17 | URL: http://github.com/blatinier/pyhunspell |
e0e62b71 | 18 | BuildRequires: hunspell-devel >= 1.3 |
59c75a23 | 19 | BuildRequires: pkgconfig |
c6c6bfd7 | 20 | BuildRequires: rpm-pythonprov |
59c75a23 JB |
21 | BuildRequires: rpmbuild(macros) >= 1.714 |
22 | BuildRequires: sed >= 4.0 | |
c6c6bfd7 | 23 | %if %{with python2} |
632dbe71 | 24 | BuildRequires: python-devel >= 2 |
c6c6bfd7 MK |
25 | %endif |
26 | %if %{with python3} | |
632dbe71 | 27 | BuildRequires: python3-devel >= 1:3.2 |
632dbe71 | 28 | BuildRequires: python3-modules >= 1:3.2 |
c6c6bfd7 | 29 | %endif |
632dbe71 | 30 | Requires: python-modules >= 2 |
c6c6bfd7 MK |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | Pyhunspell is a set of Python bindings for the Hunspell spellchecker | |
35 | engine. It lets developers load Hunspell dictionaries, check words, | |
36 | get suggestions, add new words, etc. It also provides some basic | |
632dbe71 | 37 | morphological analysis related methods. |
c6c6bfd7 MK |
38 | |
39 | %description -l pl.UTF-8 | |
632dbe71 JB |
40 | Pyhunspell to zbiór wiązań Pythona do silnika sprawdzania pisowni |
41 | Hunspell. Pozwala załadować słowniki, sprawdzać pisownię słów, uzyskać | |
42 | sugestie, dodawać nowe słowa itp. Daje dostęp do podstawowywch metod | |
43 | analizy morfologicznej. | |
c6c6bfd7 MK |
44 | |
45 | %package -n python3-%{module} | |
632dbe71 JB |
46 | Summary: Pyhunspell - Python 3.x bindings for the Hunspell spellchecker engine |
47 | Summary(pl.UTF-8): Pyhunspell - wiązania Pythona 3.x do silnika sprawdzania pisowni Hunspell | |
c6c6bfd7 | 48 | Group: Libraries/Python |
632dbe71 | 49 | Requires: python3-modules >= 1:3.2 |
c6c6bfd7 MK |
50 | |
51 | %description -n python3-%{module} | |
2fc57f59 MK |
52 | Pyhunspell is a set of Python bindings for the Hunspell spellchecker |
53 | engine. It lets developers load Hunspell dictionaries, check words, | |
54 | get suggestions, add new words, etc. It also provides some basic | |
55 | morphological analysis related methods | |
c6c6bfd7 MK |
56 | |
57 | %description -n python3-%{module} -l pl.UTF-8 | |
2fc57f59 MK |
58 | Moduł interfejsu do słownika Hunspell. Pozwala załadować słowniki, |
59 | sprawdzać pisownie, uzyskać sugestie, dodawać słowa itp. Daje dostęp | |
60 | do podstawowywch metod analizy morfologicznej. | |
c6c6bfd7 | 61 | |
c6c6bfd7 MK |
62 | %prep |
63 | %setup -q -n %{module}-%{version} | |
59c75a23 JB |
64 | |
65 | hunspell_abi="$(pkg-config --modversion hunspell | cut -d. -f1-2)" | |
66 | %{__sed} -i -e "/libraries/s/'hunspell'/'hunspell-${hunspell_abi}'/" setup.py | |
c6c6bfd7 MK |
67 | |
68 | %build | |
69 | %if %{with python2} | |
59c75a23 | 70 | %py_build |
c6c6bfd7 MK |
71 | %endif |
72 | ||
73 | %if %{with python3} | |
59c75a23 | 74 | %py3_build |
c6c6bfd7 MK |
75 | %endif |
76 | ||
c6c6bfd7 MK |
77 | %install |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %if %{with python2} | |
ecc1fc97 | 81 | %py_install |
c6c6bfd7 MK |
82 | |
83 | %py_postclean | |
84 | %endif | |
85 | ||
86 | %if %{with python3} | |
ecc1fc97 | 87 | %py3_install |
c6c6bfd7 MK |
88 | %endif |
89 | ||
c6c6bfd7 MK |
90 | %clean |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %if %{with python2} | |
94 | %files | |
95 | %defattr(644,root,root,755) | |
632dbe71 | 96 | %attr(755,root,root) %{py_sitedir}/hunspell.so |
c6c6bfd7 | 97 | %if "%{py_ver}" > "2.4" |
632dbe71 | 98 | %{py_sitedir}/hunspell-%{version}-py*.egg-info |
c6c6bfd7 | 99 | %endif |
c6c6bfd7 MK |
100 | %endif |
101 | ||
102 | %if %{with python3} | |
103 | %files -n python3-%{module} | |
104 | %defattr(644,root,root,755) | |
632dbe71 JB |
105 | %attr(755,root,root) %{py3_sitedir}/hunspell.cpython-*.so |
106 | %{py3_sitedir}/hunspell-%{version}-py*.egg-info | |
c6c6bfd7 | 107 | %endif |