]> git.pld-linux.org Git - packages/python-pyparsing.git/blob - python-pyparsing.spec
3962857e1023648b2349d0002690a98ebaed3041
[packages/python-pyparsing.git] / python-pyparsing.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
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
9 Name:           python-%{module}
10 Version:        2.1.10
11 Release:        2
12 License:        MIT
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
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.6
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel >= 1:3.3
26 BuildRequires:  python3-modules >= 1:3.3
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-libs
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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
38 Python code.
39
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
45 Pythona.
46
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
51
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
57 Python code.
58
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
64 Pythona.
65
66 %package doc
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}
71
72 %description doc
73 This package contains documentation files for pyparsing Python module.
74
75 %description doc -l pl.UTF-8
76 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
77
78 %package examples
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}
83
84 %description examples
85 This package contains example files for pyparsing Python module.
86
87 %description examples -l pl.UTF-8
88 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
89
90 %prep
91 %setup -q -n %{module}-%{version}
92
93 %build
94 %if %{with python2}
95 %py_build
96 %endif
97
98 %if %{with python3}
99 %py3_build
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
105
106 %if %{with python2}
107 %py_install
108
109 %py_postclean
110 %endif
111
112 %if %{with python3}
113 %py3_install
114 %endif
115
116 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
123 %defattr(644,root,root,755)
124 %doc CHANGES LICENSE README
125 %{py_sitescriptdir}/pyparsing.py[co]
126 %{py_sitescriptdir}/pyparsing-*.egg-info
127 %endif
128
129 %if %{with python3}
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
136 %endif
137
138 %files doc
139 %defattr(644,root,root,755)
140 %doc HowToUsePyparsing.html htmldoc pyparsingClassDiagram.{JPG,PNG}
141
142 %files examples
143 %defattr(644,root,root,755)
144 %{_examplesdir}/%{name}-%{version}
This page took 0.294928 seconds and 2 git commands to generate.