]> git.pld-linux.org Git - packages/python-funcparserlib.git/blame - python-funcparserlib.spec
rebuild with tests and docs
[packages/python-funcparserlib.git] / python-funcparserlib.spec
CommitLineData
c82f8135
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
4c4d041c 7%define module funcparserlib
2a84d318 8Summary: Recursive descent parsing library based on functional combinators
c82f8135 9Summary(pl.UTF-8): Biblioteka analizy rekurencyjnej oparta na kombinatorach funkcyjnych
5a5ccf8f 10Name: python-%{module}
c82f8135 11Version: 0.3.6
69f35b4f 12Release: 5
4c4d041c 13License: MIT
c82f8135
JB
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/funcparserlib/
16Source0: https://files.pythonhosted.org/packages/source/f/funcparserlib/%{module}-%{version}.tar.gz
17# Source0-md5: 3aba546bdad5d0826596910551ce37c0
18URL: https://github.com/vlasovskikh/funcparserlib
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.5
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-2to3 >= 1:3.2
25BuildRequires: python3-modules >= 1:3.2
26BuildRequires: python3-setuptools
27%endif
28BuildRequires: rpmbuild(macros) >= 1.714
29Requires: python-modules >= 1:2.5
4c4d041c 30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
c82f8135
JB
34Recursive descent parsing library based on functional combinators.
35
36%description -l pl.UTF-8
37Biblioteka analizy rekurencyjnej oparta na kombinatorach funkcyjnych.
38
39%package -n python3-%{module}
40Summary: Recursive descent parsing library based on functional combinators
41Summary(pl.UTF-8): Biblioteka analizy rekurencyjnej oparta na kombinatorach funkcyjnych
42Group: Libraries/Python
43Requires: python3-modules >= 1:3.2
44
45%description -n python3-%{module}
46Recursive descent parsing library based on functional combinators.
47
48%description -n python3-%{module} -l pl.UTF-8
49Biblioteka analizy rekurencyjnej oparta na kombinatorach funkcyjnych.
4c4d041c 50
51%prep
52%setup -q -n %{module}-%{version}
4c4d041c 53
54%build
c82f8135 55%if %{with python2}
3993f435 56%py_build
4c4d041c 57
c82f8135
JB
58%if %{with tests}
59cd build-2/lib
60%{__python} -m unittest discover
61cd ../..
62%endif
63%endif
64
65%if %{with python3}
66%py3_build
67
68%if %{with tests}
69# run tests on 2to3'd sources
70cd build-3/lib
71%{__python3} -m unittest discover
72cd ../..
73%endif
74%endif
75
4c4d041c 76%install
77rm -rf $RPM_BUILD_ROOT
4c4d041c 78
c82f8135
JB
79%if %{with python2}
80%py_install
81
82%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
4c4d041c 83%py_postclean
c82f8135
JB
84%endif
85
86%if %{with python3}
87%py3_install
88
89%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
90%endif
4c4d041c 91
4c4d041c 92%clean
93rm -rf $RPM_BUILD_ROOT
94
c82f8135 95%if %{with python2}
4c4d041c 96%files
97%defattr(644,root,root,755)
c82f8135
JB
98%doc CHANGES LICENSE README doc/*.md
99%{py_sitescriptdir}/%{module}
100%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
101%endif
102
103%if %{with python3}
104%files -n python3-%{module}
105%defattr(644,root,root,755)
106%doc CHANGES LICENSE README doc/*.md
107%{py3_sitescriptdir}/%{module}
108%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
4c4d041c 109%endif
This page took 0.39495 seconds and 4 git commands to generate.