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