]> git.pld-linux.org Git - packages/python3-pyparsing.git/blob - python3-pyparsing.spec
rebuild with tests and docs
[packages/python3-pyparsing.git] / python3-pyparsing.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
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}
10 Version:        3.0.7
11 Release:        3
12 License:        MIT
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
21 %if %{with tests}
22 BuildRequires:  python3-jinja2
23 BuildRequires:  python3-pytest
24 BuildRequires:  python3-railroad-diagrams
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 %{?with_doc:BuildRequires:      sphinx-pdg-3}
29 Requires:       python3-modules >= 1:3.6
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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
38 Python code.
39
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
45 Pythona.
46
47 %package doc
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}
52
53 %description doc
54 This package contains documentation files for pyparsing Python module.
55
56 %description doc -l pl.UTF-8
57 Pakiet zawierający dokumentację dla modułu Pythona pyparsing.
58
59 %package examples
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}
64
65 %description examples
66 This package contains example files for pyparsing Python module.
67
68 %description examples -l pl.UTF-8
69 Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
70
71 %prep
72 %setup -q -n %{module}-%{version}
73
74 %build
75 %py3_build
76
77 %if %{with tests}
78 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79 %{__python3} -m pytest tests
80 %endif
81
82 %if %{with doc}
83 %{__make} -C docs html \
84         SPHINXBUILD=sphinx-build-3
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90
91 %py3_install
92
93 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc CHANGES LICENSE README.rst
101 %{py3_sitescriptdir}/pyparsing
102 %{py3_sitescriptdir}/pyparsing-*.egg-info
103
104 %if %{with doc}
105 %files doc
106 %defattr(644,root,root,755)
107 %doc docs/_build/html/{_static,*.html,*.js}
108 %endif
109
110 %files examples
111 %defattr(644,root,root,755)
112 %{_examplesdir}/%{name}-%{version}
This page took 0.148701 seconds and 3 git commands to generate.