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