]> git.pld-linux.org Git - packages/python-pyparsing.git/blob - python-pyparsing.spec
26825533f479a38ccd7c51c6ffe7fb1eefc9c7ff
[packages/python-pyparsing.git] / python-pyparsing.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pyparsing
8 Summary:        pyparsing - Python 2 module for creating executing simple grammars
9 Summary(pl.UTF-8):      pyparsing - moduł Pythona 2 umożliwiający tworzenie i parsowanie prostych gramatyk
10 Name:           python-%{module}
11 # keep 2.x here for python2 support
12 Version:        2.4.7
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/pyparsing/
17 Source0:        https://files.pythonhosted.org/packages/source/p/pyparsing/%{module}-%{version}.tar.gz
18 # Source0-md5:  f0953e47a0112f7a65aec2305ffdf7b4
19 URL:            https://github.com/pyparsing/pyparsing/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.6
24 BuildRequires:  python-modules >= 1:2.6
25 BuildRequires:  python-setuptools
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-devel >= 1:3.3
29 BuildRequires:  python3-modules >= 1:3.3
30 BuildRequires:  python3-setuptools
31 %endif
32 %{?with_doc:BuildRequires:      sphinx-pdg-2}
33 Requires:       python-modules >= 1:2.6
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 The parsing module is an alternative approach to creating and
39 executing simple grammars, vs. the traditional lex/yacc approach, or
40 the use of regular expressions. The parsing module provides a library
41 of classes that client code uses to construct the grammar directly in
42 Python code.
43
44 %description -l pl.UTF-8
45 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
46 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
47 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
48 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
49 Pythona.
50
51 %package -n python3-%{module}
52 Summary:        pyparsing - Python 3 module for creating executing simple grammars
53 Summary(pl.UTF-8):      pyparsing - moduł Pythona 3 umożliwiający tworzenie i parsowanie prostych gramatyk
54 Group:          Libraries/Python
55 Requires:       python3-modules >= 1:3.3
56
57 %description -n python3-%{module}
58 The parsing module is an alternative approach to creating and
59 executing simple grammars, vs. the traditional lex/yacc approach, or
60 the use of regular expressions. The parsing module provides a library
61 of classes that client code uses to construct the grammar directly in
62 Python code.
63
64 %description -n python3-%{module} -l pl.UTF-8
65 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
66 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
67 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
68 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
69 Pythona.
70
71 %package doc
72 Summary:        Documentation for pyparsing module
73 Summary(pl.UTF-8):      Dokumentacja do modułu pyparsing
74 Group:          Libraries/Python
75 Requires:       %{name} = %{version}-%{release}
76
77 %description doc
78 This package contains documentation files for pyparsing Python module.
79
80 %description doc -l pl.UTF-8
81 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
82
83 %package examples
84 Summary:        Examples for pyparsing module
85 Summary(pl.UTF-8):      Przykłady do modułu pyparsing
86 Group:          Libraries/Python
87 Requires:       %{name} = %{version}-%{release}
88
89 %description examples
90 This package contains example files for pyparsing Python module.
91
92 %description examples -l pl.UTF-8
93 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
94
95 %prep
96 %setup -q -n %{module}-%{version}
97
98 %build
99 %if %{with python2}
100 %py_build
101 %endif
102
103 %if %{with python3}
104 %py3_build
105 %endif
106
107 %if %{with doc}
108 %{__make} -C docs html \
109         SPHINXBUILD=sphinx-build-2
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
115
116 %if %{with python2}
117 %py_install
118
119 %py_postclean
120 %endif
121
122 %if %{with python3}
123 %py3_install
124 %endif
125
126 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with python2}
132 %files
133 %defattr(644,root,root,755)
134 %doc CHANGES LICENSE README.rst
135 %{py_sitescriptdir}/pyparsing.py[co]
136 %{py_sitescriptdir}/pyparsing-*.egg-info
137 %endif
138
139 %if %{with python3}
140 %files -n python3-%{module}
141 %defattr(644,root,root,755)
142 %doc CHANGES LICENSE README.rst
143 %{py3_sitescriptdir}/pyparsing.py
144 %{py3_sitescriptdir}/__pycache__/pyparsing*.py[co]
145 %{py3_sitescriptdir}/pyparsing-*.egg-info
146 %endif
147
148 %if %{with doc}
149 %files doc
150 %defattr(644,root,root,755)
151 %doc docs/_build/html/{_static,*.html,*.js}
152 %endif
153
154 %files examples
155 %defattr(644,root,root,755)
156 %{_examplesdir}/%{name}-%{version}
This page took 0.042776 seconds and 2 git commands to generate.