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
7 %define egg_name pygtail
8 %define pypi_name pygtail
9 Summary: Reads log file lines that have not been read
10 Name: python-%{pypi_name}
14 Group: Libraries/Python
15 Source0: https://github.com/bgreenlee/pygtail/archive/%{version}.tar.gz
16 # Source0-md5: 504ffc804e83a4dd09e20546990b1d43
17 Patch0: python-pygtail-bug-38.patch
18 URL: https://github.com/bgreenlee/pygtail
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules
27 BuildRequires: python3-setuptools
29 Requires: python-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Pygtail reads log file lines that have not been read. It will even
35 handle log files that have been rotated.
37 %package -n python3-%{pypi_name}
40 Group: Libraries/Python
41 Requires: python3-modules
43 %description -n python3-%{pypi_name}
44 Pygtail reads log file lines that have not been read. It will even
45 handle log files that have been rotated.
48 %setup -q -n %{pypi_name}-%{version}
51 sed -i -e 's#0\.7\.0#0\.8\.0#g' pygtail/core.py
55 %py_build %{?with_tests:test}
59 %py3_build %{?with_tests:test}
63 rm -rf $RPM_BUILD_ROOT
74 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
80 %{py_sitescriptdir}/%{module}
81 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
85 %files -n python3-%{pypi_name}
86 %defattr(644,root,root,755)
88 %attr(755,root,root) %{_bindir}/pygtail
89 %{py3_sitescriptdir}/%{module}
90 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info