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