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