]> git.pld-linux.org Git - packages/python-hunspell.git/blob - python-hunspell.spec
- python3.5 rebuild
[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.3.2
11 Release:        3
12 License:        LGPL v3+
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/h/hunspell/hunspell-%{version}.tar.gz
15 # Source0-md5:  39373430a1541618aea67d99d31d0ac8
16 Patch0:         %{name}-lib_fix.patch
17 URL:            http://github.com/blatinier/pyhunspell
18 BuildRequires:  hunspell-devel >= 1.3
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.219
21 %if %{with python2}
22 BuildRequires:  python-devel >= 2
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.2
27 BuildRequires:  python3-distribute
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 %patch0 -p1
65
66 %build
67 %if %{with python2}
68 CC="%{__cc}" \
69 CFLAGS="%{rpmcflags}" \
70 %{__python} setup.py build \
71         --build-base build-2
72 %endif
73
74 %if %{with python3}
75 CC="%{__cc}" \
76 CFLAGS="%{rpmcflags}" \
77 %{__python3} setup.py build \
78         --build-base build-3
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %{__python} setup.py \
86         build --build-base build-2 \
87         install --skip-build \
88         --optimize=2 \
89         --root=$RPM_BUILD_ROOT
90
91 %py_postclean
92 %endif
93
94 %if %{with python3}
95 %{__python3} setup.py \
96         build --build-base build-3 \
97         install --skip-build \
98         --optimize=2 \
99         --root=$RPM_BUILD_ROOT
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc README
109 %attr(755,root,root) %{py_sitedir}/hunspell.so
110 %if "%{py_ver}" > "2.4"
111 %{py_sitedir}/hunspell-%{version}-py*.egg-info
112 %endif
113 %endif
114
115 %if %{with python3}
116 %files -n python3-%{module}
117 %defattr(644,root,root,755)
118 %doc README
119 %attr(755,root,root) %{py3_sitedir}/hunspell.cpython-*.so
120 %{py3_sitedir}/hunspell-%{version}-py*.egg-info
121 %endif
This page took 0.083943 seconds and 4 git commands to generate.