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