]> git.pld-linux.org Git - packages/python-lz4.git/blob - python-lz4.spec
- rebuild with python 3.8
[packages/python-lz4.git] / python-lz4.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  lz4
8 Summary:        LZ4 bindings for Python
9 Name:           python-%{module}
10 Version:        2.1.6
11 Release:        2
12 License:        BSD
13 Group:          Libraries/Python
14 Source0:        http://pypi.debian.net/lz4/lz4-%{version}.tar.gz
15 # Source0-md5:  badde942dabaac89256243b87977c49c
16 URL:            https://github.com/python-lz4/python-lz4
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-devel
21 %if %{with tests}
22 BuildRequires:  python-future
23 BuildRequires:  python-pytest-cov
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel
28 %if %{with tests}
29 BuildRequires:  python3-future
30 BuildRequires:  python3-pytest-cov
31 %endif
32 %endif
33 BuildRequires:  lz4-devel >= 1.7.5
34 Requires:       python-modules
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 This package provides python bindings for the LZ4 compression library.
39
40 %package -n python3-%{module}
41 Summary:        LZ4 bindings for Python
42 Group:          Libraries/Python
43 Requires:       python3-modules
44
45 %description -n python3-%{module}
46 This package provides python bindings for the LZ4 compression library.
47
48 %package apidocs
49 Summary:        %{module} API documentation
50 Summary(pl.UTF-8):      Dokumentacja API %{module}
51 Group:          Documentation
52
53 %description apidocs
54 API documentation for %{module}.
55
56 %description apidocs -l pl.UTF-8
57 Dokumentacja API %{module}.
58
59 %prep
60 %setup -q -n %{module}-%{version}
61
62 %build
63 %if %{with python2}
64 %py_build %{?with_tests:test}
65 %endif
66
67 %if %{with python3}
68 %py3_build %{?with_tests:test}
69 %endif
70
71 %if %{with doc}
72 cd docs
73 %{__make} -j1 html
74 rm -rf _build/html/_sources
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %if %{with python2}
80 %py_install
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc README.rst
95 %dir %{py_sitedir}/%{module}
96 %{py_sitedir}/%{module}/*.py[co]
97 %dir %{py_sitedir}/%{module}/block
98 %{py_sitedir}/%{module}/block/*.py[co]
99 %dir %{py_sitedir}/%{module}/frame
100 %{py_sitedir}/%{module}/frame/*.py[co]
101 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
102 %attr(755,root,root) %{py_sitedir}/%{module}/block/*.so
103 %attr(755,root,root) %{py_sitedir}/%{module}/frame/*.so
104 %{py_sitedir}/%{module}-%{version}-py*.egg-info
105 %endif
106
107 %if %{with python3}
108 %files -n python3-%{module}
109 %defattr(644,root,root,755)
110 %doc README.rst
111 %dir %{py3_sitedir}/%{module}
112 %{py3_sitedir}/%{module}/*.py
113 %dir %{py3_sitedir}/%{module}/block
114 %{py3_sitedir}/%{module}/block/*.py
115 %dir %{py3_sitedir}/%{module}/frame
116 %{py3_sitedir}/%{module}/frame/*.py
117 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
118 %attr(755,root,root) %{py3_sitedir}/%{module}/block/*.so
119 %attr(755,root,root) %{py3_sitedir}/%{module}/frame/*.so
120 %{py3_sitedir}/%{module}/__pycache__
121 %{py3_sitedir}/%{module}/block/__pycache__
122 %{py3_sitedir}/%{module}/frame/__pycache__
123 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
124 %endif
125
126 %if %{with doc}
127 %files apidocs
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/*
130 %endif
This page took 0.063282 seconds and 3 git commands to generate.