]> git.pld-linux.org Git - packages/python-pyparsing.git/blob - python-pyparsing.spec
- new URLs, updated to 2.4.2
[packages/python-pyparsing.git] / python-pyparsing.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pyparsing
8 Summary:        pyparsing - Python 2 module for creating executing simple grammars
9 Summary(pl.UTF-8):      pyparsing - moduł Pythona 2 umożliwiający tworzenie i parsowanie prostych gramatyk
10 Name:           python-%{module}
11 Version:        2.4.2
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pyparsing/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pyparsing/%{module}-%{version}.tar.gz
17 # Source0-md5:  46d02cbe0461fe0571d51649e6006ef5
18 URL:            https://github.com/pyparsing/pyparsing/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.6
23 BuildRequires:  python-modules >= 1:2.6
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel >= 1:3.3
28 BuildRequires:  python3-modules >= 1:3.3
29 BuildRequires:  python3-setuptools
30 %endif
31 %{?with_doc:BuildRequires:      sphinx-pdg}
32 Requires:       python-modules >= 1:2.6
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 The parsing module is an alternative approach to creating and
38 executing simple grammars, vs. the traditional lex/yacc approach, or
39 the use of regular expressions. The parsing module provides a library
40 of classes that client code uses to construct the grammar directly in
41 Python code.
42
43 %description -l pl.UTF-8
44 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
45 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
46 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
47 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
48 Pythona.
49
50 %package -n python3-%{module}
51 Summary:        pyparsing - Python 3 module for creating executing simple grammars
52 Summary(pl.UTF-8):      pyparsing - moduł Pythona 3 umożliwiający tworzenie i parsowanie prostych gramatyk
53 Group:          Libraries/Python
54 Requires:       python-modules >= 1:3.3
55
56 %description -n python3-%{module}
57 The parsing module is an alternative approach to creating and
58 executing simple grammars, vs. the traditional lex/yacc approach, or
59 the use of regular expressions. The parsing module provides a library
60 of classes that client code uses to construct the grammar directly in
61 Python code.
62
63 %description -n python3-%{module} -l pl.UTF-8
64 Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
65 sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
66 pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
67 klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
68 Pythona.
69
70 %package doc
71 Summary:        Documentation for pyparsing module
72 Summary(pl.UTF-8):      Dokumentacja do modułu pyparsing
73 Group:          Libraries/Python
74 Requires:       %{name} = %{version}-%{release}
75
76 %description doc
77 This package contains documentation files for pyparsing Python module.
78
79 %description doc -l pl.UTF-8
80 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
81
82 %package examples
83 Summary:        Examples for pyparsing module
84 Summary(pl.UTF-8):      Przykłady do modułu pyparsing
85 Group:          Libraries/Python
86 Requires:       %{name} = %{version}-%{release}
87
88 %description examples
89 This package contains example files for pyparsing Python module.
90
91 %description examples -l pl.UTF-8
92 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
93
94 %prep
95 %setup -q -n %{module}-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build
100 %endif
101
102 %if %{with python3}
103 %py3_build
104 %endif
105
106 %if %{with doc}
107 %{__make} -C docs html
108 %endif
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
113
114 %if %{with python2}
115 %py_install
116
117 %py_postclean
118 %endif
119
120 %if %{with python3}
121 %py3_install
122 %endif
123
124 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %if %{with python2}
130 %files
131 %defattr(644,root,root,755)
132 %doc CHANGES LICENSE README.rst
133 %{py_sitescriptdir}/pyparsing.py[co]
134 %{py_sitescriptdir}/pyparsing-*.egg-info
135 %endif
136
137 %if %{with python3}
138 %files -n python3-%{module}
139 %defattr(644,root,root,755)
140 %doc CHANGES LICENSE README.rst
141 %{py3_sitescriptdir}/pyparsing.py
142 %{py3_sitescriptdir}/__pycache__/pyparsing*.py[co]
143 %{py3_sitescriptdir}/pyparsing-*.egg-info
144 %endif
145
146 %files doc
147 %defattr(644,root,root,755)
148 %doc docs/_build/html/{_static,*.html,*.js}
149
150 %files examples
151 %defattr(644,root,root,755)
152 %{_examplesdir}/%{name}-%{version}
This page took 0.072167 seconds and 3 git commands to generate.