]> git.pld-linux.org Git - SPECS.git/blob - python-file_read_backwards.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / python-file_read_backwards.spec
1 #
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
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}
13 Version:        1.2.2
14 Release:        4
15 License:        MIT
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
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules
28 BuildRequires:  python3-setuptools
29 %endif
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Memory efficient way of reading files line-by-line from the end of
36 file.
37
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
42
43 %description -n python3-%{module}
44 Memory efficient way of reading files line-by-line from the end of
45 file.
46
47 %package apidocs
48 Summary:        %{module} API documentation
49 Summary(pl.UTF-8):      Dokumentacja API %{module}
50 Group:          Documentation
51
52 %description apidocs
53 API documentation for %{module}.
54
55 %description apidocs -l pl.UTF-8
56 Dokumentacja 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}
71 cd docs
72 %{__make} -j1 html
73 rm -rf _build/html/_sources
74 %endif
75
76 %install
77 rm -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
93 rm -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.187868 seconds and 3 git commands to generate.