3 %bcond_with doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module file_read_backwards
9 %define egg_name file_read_backwards
10 %define pypi_name file_read_backwards
11 Summary: Memory efficient way of reading files line-by-line from the end of file
12 Name: python-%{pypi_name}
16 Group: Libraries/Python
17 Source0: https://github.com/robin81/file_read_backwards/archive/v%{version}.tar.gz
18 # Source0-md5: 73aa41f1785bee312be542dcc2d1ae60
19 URL: https://pypi.python.org/pypi/file-read-backwards
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules
28 BuildRequires: python3-setuptools
30 Requires: python-modules
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Memory efficient way of reading files line-by-line from the end of
38 %package -n python3-%{module}
39 Summary: Memory efficient way of reading files line-by-line from the end of file
40 Group: Libraries/Python
41 Requires: python3-modules
43 %description -n python3-%{module}
44 Memory efficient way of reading files line-by-line from the end of
48 Summary: %{module} API documentation
49 Summary(pl.UTF-8): Dokumentacja API %{module}
53 API documentation for %{module}.
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API %{module}.
59 %setup -q -n %{pypi_name}-%{version}
63 %py_build %{?with_tests:test}
67 %py3_build %{?with_tests:test}
73 rm -rf _build/html/_sources
77 rm -rf $RPM_BUILD_ROOT
82 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
83 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
93 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
99 %{py_sitescriptdir}/%{module}
100 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %doc AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
107 %{py3_sitescriptdir}/%{module}
108 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
113 %defattr(644,root,root,755)
114 %doc docs/_build/html/*