]> git.pld-linux.org Git - packages/python-file_read_backwards.git/blame - python-file_read_backwards.spec
rebuild with python 3.10
[packages/python-file_read_backwards.git] / python-file_read_backwards.spec
CommitLineData
3e4e923a 1#
bad62c61
AM
2# Conditional build:
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
7
bad62c61
AM
8%define module file_read_backwards
9%define egg_name file_read_backwards
10%define pypi_name file_read_backwards
11Summary: Memory efficient way of reading files line-by-line from the end of file
12Name: python-%{pypi_name}
21b92de0 13Version: 1.2.2
1460cb1f 14Release: 5
bad62c61
AM
15License: MIT
16Group: Libraries/Python
17Source0: https://github.com/robin81/file_read_backwards/archive/v%{version}.tar.gz
21b92de0 18# Source0-md5: 73aa41f1785bee312be542dcc2d1ae60
bad62c61
AM
19URL: https://pypi.python.org/pypi/file-read-backwards
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules
28BuildRequires: python3-setuptools
29%endif
30Requires: python-modules
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35Memory efficient way of reading files line-by-line from the end of
36file.
37
38%package -n python3-%{module}
39Summary: Memory efficient way of reading files line-by-line from the end of file
40Group: Libraries/Python
41Requires: python3-modules
42
43%description -n python3-%{module}
44Memory efficient way of reading files line-by-line from the end of
45file.
46
47%package apidocs
48Summary: %{module} API documentation
49Summary(pl.UTF-8): Dokumentacja API %{module}
50Group: Documentation
51
52%description apidocs
53API documentation for %{module}.
54
55%description apidocs -l pl.UTF-8
56Dokumentacja API %{module}.
57
58%prep
59%setup -q -n %{pypi_name}-%{version}
60
61%build
62%if %{with python2}
63%py_build %{?with_tests:test}
64%endif
65
66%if %{with python3}
67%py3_build %{?with_tests:test}
68%endif
69
70%if %{with doc}
71cd docs
72%{__make} -j1 html
73rm -rf _build/html/_sources
74%endif
75
76%install
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
80%py_install
81
82%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
83%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
84
85%py_postclean
86%endif
87
88%if %{with python3}
89%py3_install
90%endif
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%if %{with python2}
96%files
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
101%endif
102
103%if %{with python3}
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
109%endif
110
111%if %{with doc}
112%files apidocs
113%defattr(644,root,root,755)
114%doc docs/_build/html/*
115%endif
This page took 0.111123 seconds and 4 git commands to generate.