3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module pyparsing
7 Summary: pyparsing - a Python module for creating executing simple grammars
8 Summary(pl.UTF-8): pyparsing - moduł Pythona umożliwiający tworzenie i parsowanie prostych gramatyk
13 Group: Libraries/Python
14 Source0: http://downloads.sourceforge.net/pyparsing/%{module}-%{version}.tar.gz
15 # Source0-md5: 065908b92904e0d3634eb156f44cc80e
16 URL: http://pyparsing.sourceforge.net/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-devel >= 1:2.6
21 BuildRequires: python-modules >= 1:2.6
22 BuildRequires: python-setuptools
25 BuildRequires: python3-devel >= 1:3.3
26 BuildRequires: python3-modules >= 1:3.3
27 BuildRequires: python3-setuptools
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The parsing module is an alternative approach to creating and
35 executing simple grammars, vs. the traditional lex/yacc approach, or
36 the use of regular expressions. The parsing module provides a library
37 of classes that client code uses to construct the grammar directly in
40 %description -l pl.UTF-8
41 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
42 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
43 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
44 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
47 %package -n python3-%{module}
48 Summary: pyparsing - a Python3 module for creating executing simple grammars
49 Summary(pl.UTF-8): pyparsing - moduł Pythona3 umożliwiający tworzenie i parsowanie prostych gramatyk
50 Group: Libraries/Python
52 %description -n python3-%{module}
53 The parsing module is an alternative approach to creating and
54 executing simple grammars, vs. the traditional lex/yacc approach, or
55 the use of regular expressions. The parsing module provides a library
56 of classes that client code uses to construct the grammar directly in
59 %description -n python3-%{module} -l pl.UTF-8
60 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
61 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
62 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
63 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
67 Summary: Documentation for pyparsing module
68 Summary(pl.UTF-8): Dokumentacja do modułu pyparsing
69 Group: Libraries/Python
70 Requires: %{name} = %{version}-%{release}
73 This package contains documentation files for pyparsing Python module.
75 %description doc -l pl.UTF-8
76 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
79 Summary: Examples for pyparsing module
80 Summary(pl.UTF-8): Przykłady do modułu pyparsing
81 Group: Libraries/Python
82 Requires: %{name} = %{version}-%{release}
85 This package contains example files for pyparsing Python module.
87 %description examples -l pl.UTF-8
88 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
91 %setup -q -n %{module}-%{version}
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
116 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc CHANGES LICENSE README
125 %{py_sitescriptdir}/pyparsing.py[co]
126 %{py_sitescriptdir}/pyparsing-*.egg-info
130 %files -n python3-%{module}
131 %defattr(644,root,root,755)
132 %doc CHANGES LICENSE README
133 %{py3_sitescriptdir}/pyparsing.py
134 %{py3_sitescriptdir}/__pycache__/pyparsing*.py[co]
135 %{py3_sitescriptdir}/pyparsing-*.egg-info
139 %defattr(644,root,root,755)
140 %doc HowToUsePyparsing.html htmldoc pyparsingClassDiagram.{JPG,PNG}
143 %defattr(644,root,root,755)
144 %{_examplesdir}/%{name}-%{version}