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