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