]> git.pld-linux.org Git - packages/python-pygtail.git/blame - python-pygtail.spec
rebuild with python 3.10
[packages/python-pygtail.git] / python-pygtail.spec
CommitLineData
4ac58333
AM
1# Conditional build:
2%bcond_without tests # do not perform "make test"
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module pygtail
7%define egg_name pygtail
8%define pypi_name pygtail
9Summary: Reads log file lines that have not been read
10Name: python-%{pypi_name}
11Version: 0.8.0
f69509be 12Release: 6
4ac58333
AM
13License: GPL v2
14Group: Libraries/Python
15Source0: https://github.com/bgreenlee/pygtail/archive/%{version}.tar.gz
16# Source0-md5: 504ffc804e83a4dd09e20546990b1d43
2892fc57 17Patch0: python-pygtail-bug-38.patch
4ac58333
AM
18URL: https://github.com/bgreenlee/pygtail
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
29Requires: python-modules
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Pygtail reads log file lines that have not been read. It will even
35handle log files that have been rotated.
36
37%package -n python3-%{pypi_name}
38Summary: -
39Summary(pl.UTF-8): -
40Group: Libraries/Python
41Requires: python3-modules
42
43%description -n python3-%{pypi_name}
44Pygtail reads log file lines that have not been read. It will even
45handle log files that have been rotated.
46
47%prep
48%setup -q -n %{pypi_name}-%{version}
2892fc57
AM
49%patch0 -p1
50
4ac58333
AM
51sed -i -e 's#0\.7\.0#0\.8\.0#g' pygtail/core.py
52
53%build
54%if %{with python2}
55%py_build %{?with_tests:test}
56%endif
57
58%if %{with python3}
59%py3_build %{?with_tests:test}
60%endif
61
62%install
63rm -rf $RPM_BUILD_ROOT
64
65%if %{with python2}
66%py_install
67%endif
68
69%if %{with python3}
70%py3_install
71%endif
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%if %{with python2}
77%files
78%defattr(644,root,root,755)
79%doc README.md
80%{py_sitescriptdir}/%{module}
81%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
82%endif
83
84%if %{with python3}
85%files -n python3-%{pypi_name}
86%defattr(644,root,root,755)
87%doc README.md
88%attr(755,root,root) %{_bindir}/pygtail
89%{py3_sitescriptdir}/%{module}
90%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
91%endif
This page took 0.31959 seconds and 4 git commands to generate.