3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 %define module pyparsing
7 Summary: pyparsing - Python 3 module for creating executing simple grammars
8 Summary(pl.UTF-8): pyparsing - moduł Pythona 3 umożliwiający tworzenie i parsowanie prostych gramatyk
9 Name: python3-%{module}
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/pyparsing/
15 Source0: https://files.pythonhosted.org/packages/source/p/pyparsing/%{module}-%{version}.tar.gz
16 # Source0-md5: 9d38774991175444e21a3dfa865876cc
17 URL: https://github.com/pyparsing/pyparsing/
18 BuildRequires: python3-devel >= 1:3.6
19 BuildRequires: python3-modules >= 1:3.6
20 BuildRequires: python3-setuptools
22 BuildRequires: python3-jinja2
23 BuildRequires: python3-pytest
24 BuildRequires: python3-railroad-diagrams
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.714
28 %{?with_doc:BuildRequires: sphinx-pdg-3}
29 Requires: python3-modules >= 1:3.6
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
48 Summary: Documentation for pyparsing module
49 Summary(pl.UTF-8): Dokumentacja do modułu pyparsing
50 Group: Libraries/Python
51 Requires: %{name} = %{version}-%{release}
54 This package contains documentation files for pyparsing Python module.
56 %description doc -l pl.UTF-8
57 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
60 Summary: Examples for pyparsing module
61 Summary(pl.UTF-8): Przykłady do modułu pyparsing
62 Group: Libraries/Python
63 Requires: %{name} = %{version}-%{release}
66 This package contains example files for pyparsing Python module.
68 %description examples -l pl.UTF-8
69 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
72 %setup -q -n %{module}-%{version}
78 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79 %{__python3} -m pytest tests
83 %{__make} -C docs html \
84 SPHINXBUILD=sphinx-build-3
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
93 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
96 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc CHANGES LICENSE README.rst
101 %{py3_sitescriptdir}/pyparsing
102 %{py3_sitescriptdir}/pyparsing-*.egg-info
106 %defattr(644,root,root,755)
107 %doc docs/_build/html/{_static,*.html,*.js}
111 %defattr(644,root,root,755)
112 %{_examplesdir}/%{name}-%{version}