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