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: 37adec94104b98591507218bc82e7c31
16 URL: http://pyparsing.sourceforge.net/
18 BuildRequires: python-devel >= 1:2.5
19 BuildRequires: python-modules
22 BuildRequires: python3-devel
23 BuildRequires: python3-distribute
24 BuildRequires: python3-modules
26 BuildRequires: rpm-pythonprov
27 %pyrequires_eq python-libs
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 The parsing module is an alternative approach to creating and
33 executing simple grammars, vs. the traditional lex/yacc approach, or
34 the use of regular expressions. The parsing module provides a library
35 of classes that client code uses to construct the grammar directly in
38 %description -l pl.UTF-8
39 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
40 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
41 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
42 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
45 %package -n python3-%{module}
46 Summary: pyparsing - a Python3 module for creating executing simple grammars
47 Summary(pl.UTF-8): pyparsing - moduł Pythona3 umożliwiający tworzenie i parsowanie prostych gramatyk
48 Group: Libraries/Python
50 %description -n python3-%{module}
51 The parsing module is an alternative approach to creating and
52 executing simple grammars, vs. the traditional lex/yacc approach, or
53 the use of regular expressions. The parsing module provides a library
54 of classes that client code uses to construct the grammar directly in
57 %description -n python3-%{module} -l pl.UTF-8
58 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
59 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
60 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
61 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
65 Summary: Documentation for pyparsing module
66 Summary(pl.UTF-8): Dokumentacja do modułu pyparsing
67 Group: Libraries/Python
68 Requires: %{name} = %{version}-%{release}
71 This package contains documentation files for pyparsing Python module.
73 %description doc -l pl.UTF-8
74 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
77 Summary: Examples for pyparsing module
78 Summary(pl.UTF-8): Przykłady do modułu pyparsing
79 Group: Libraries/Python
80 Requires: %{name} = %{version}-%{release}
83 This package contains example files for pyparsing Python module.
85 %description examples -l pl.UTF-8
86 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
89 %setup -q -n %{module}-%{version}
92 rm -rf build-2 build-3
93 install -d build-2 build-3
97 %{__python} setup.py build_ext
104 %{__python3} setup.py build_ext
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
114 %{__python} setup.py \
117 --root=$RPM_BUILD_ROOT
125 %{__python3} setup.py \
128 --root=$RPM_BUILD_ROOT
132 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
135 rm -rf $RPM_BUILD_ROOT
139 %defattr(644,root,root,755)
141 %{py_sitescriptdir}/pyparsing.py[co]
142 %{py_sitescriptdir}/pyparsing-*.egg-info
146 %files -n python3-%{module}
147 %defattr(644,root,root,755)
149 %{py3_sitescriptdir}/pyparsing.py
150 %{py3_sitescriptdir}/__pycache__/pyparsing*.py[co]
151 %{py3_sitescriptdir}/pyparsing-*.egg-info
155 %defattr(644,root,root,755)
156 %doc HowToUsePyparsing.html htmldoc pyparsingClassDiagram.{JPG,PNG}
159 %defattr(644,root,root,755)
160 %{_examplesdir}/%{name}-%{version}