]> git.pld-linux.org Git - packages/python-hunspell.git/blob - python-hunspell.spec
9e6bed36f075193bd65e439b11ae0375842b6d55
[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.4.1
11 Release:        5
12 License:        GPL v3+
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.python.org/simple/hunspell/
15 Source0:        https://pypi.python.org/packages/source/h/hunspell/hunspell-%{version}.tar.gz
16 # Source0-md5:  d8b69c71a1e4d9a74c00972f76ea06bc
17 URL:            http://github.com/blatinier/pyhunspell
18 BuildRequires:  hunspell-devel >= 1.3
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 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel >= 1:3.2
28 BuildRequires:  python3-modules >= 1:3.2
29 %endif
30 Requires:       python-modules >= 2
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
37 morphological analysis related methods.
38
39 %description -l pl.UTF-8
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.
44
45 %package -n python3-%{module}
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
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.2
50
51 %description -n python3-%{module}
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
56
57 %description -n python3-%{module} -l pl.UTF-8
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.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64
65 hunspell_abi="$(pkg-config --modversion hunspell | cut -d. -f1-2)"
66 %{__sed} -i -e "/libraries/s/'hunspell'/'hunspell-${hunspell_abi}'/" setup.py
67
68 %build
69 %if %{with python2}
70 %py_build
71 %endif
72
73 %if %{with python3}
74 %py3_build
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %if %{with python2}
81 %py_install
82
83 %py_postclean
84 %endif
85
86 %if %{with python3}
87 %py3_install
88 %endif
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %files
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{py_sitedir}/hunspell.so
97 %if "%{py_ver}" > "2.4"
98 %{py_sitedir}/hunspell-%{version}-py*.egg-info
99 %endif
100 %endif
101
102 %if %{with python3}
103 %files -n python3-%{module}
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{py3_sitedir}/hunspell.cpython-*.so
106 %{py3_sitedir}/hunspell-%{version}-py*.egg-info
107 %endif
This page took 0.03478 seconds and 2 git commands to generate.