]> git.pld-linux.org Git - packages/python-lz4.git/blob - python-lz4.spec
- add missing BR
[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 BuildRequires:  python-pkgconfig
22 %if %{with tests}
23 BuildRequires:  python-future
24 BuildRequires:  python-psutil
25 BuildRequires:  python-pytest-cov
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel
30 BuildRequires:  python3-pkgconfig
31 %if %{with tests}
32 BuildRequires:  python3-future
33 BuildRequires:  python3-psutil
34 BuildRequires:  python3-pytest-cov
35 %endif
36 %endif
37 BuildRequires:  lz4-devel >= 1.7.5
38 Requires:       python-modules
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 This package provides python bindings for the LZ4 compression library.
43
44 %package -n python3-%{module}
45 Summary:        LZ4 bindings for Python
46 Group:          Libraries/Python
47 Requires:       python3-modules
48
49 %description -n python3-%{module}
50 This package provides python bindings for the LZ4 compression library.
51
52 %package apidocs
53 Summary:        %{module} API documentation
54 Summary(pl.UTF-8):      Dokumentacja API %{module}
55 Group:          Documentation
56
57 %description apidocs
58 API documentation for %{module}.
59
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API %{module}.
62
63 %prep
64 %setup -q -n %{module}-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build %{?with_tests:test}
69 %endif
70
71 %if %{with python3}
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %if %{with doc}
76 cd docs
77 %{__make} -j1 html
78 rm -rf _build/html/_sources
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 %if %{with python2}
84 %py_install
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 README.rst
99 %dir %{py_sitedir}/%{module}
100 %{py_sitedir}/%{module}/*.py[co]
101 %dir %{py_sitedir}/%{module}/block
102 %{py_sitedir}/%{module}/block/*.py[co]
103 %dir %{py_sitedir}/%{module}/frame
104 %{py_sitedir}/%{module}/frame/*.py[co]
105 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
106 %attr(755,root,root) %{py_sitedir}/%{module}/block/*.so
107 %attr(755,root,root) %{py_sitedir}/%{module}/frame/*.so
108 %{py_sitedir}/%{module}-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-%{module}
113 %defattr(644,root,root,755)
114 %doc README.rst
115 %dir %{py3_sitedir}/%{module}
116 %{py3_sitedir}/%{module}/*.py
117 %dir %{py3_sitedir}/%{module}/block
118 %{py3_sitedir}/%{module}/block/*.py
119 %dir %{py3_sitedir}/%{module}/frame
120 %{py3_sitedir}/%{module}/frame/*.py
121 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
122 %attr(755,root,root) %{py3_sitedir}/%{module}/block/*.so
123 %attr(755,root,root) %{py3_sitedir}/%{module}/frame/*.so
124 %{py3_sitedir}/%{module}/__pycache__
125 %{py3_sitedir}/%{module}/block/__pycache__
126 %{py3_sitedir}/%{module}/frame/__pycache__
127 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
128 %endif
129
130 %if %{with doc}
131 %files apidocs
132 %defattr(644,root,root,755)
133 %doc docs/_build/html/*
134 %endif
This page took 0.060249 seconds and 3 git commands to generate.