]> git.pld-linux.org Git - packages/python-pyparsing.git/blob - python-pyparsing.spec
BR: rpmbuild(macros) >= 1.710
[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.0.1
11 Release:        4
12 License:        MIT
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/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.710
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.5
21 BuildRequires:  python-distribute
22 BuildRequires:  python-modules
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
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 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
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 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 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.39604 seconds and 4 git commands to generate.