- release 3 (by relup.sh)
[packages/python-lz4.git] / python-lz4.spec
CommitLineData
4ed00615
AM
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
8Summary: LZ4 bindings for Python
9Name: python-%{module}
10Version: 2.1.6
4d00e2b7 11Release: 3
4ed00615
AM
12License: BSD
13Group: Libraries/Python
14Source0: http://pypi.debian.net/lz4/lz4-%{version}.tar.gz
15# Source0-md5: badde942dabaac89256243b87977c49c
16URL: https://github.com/python-lz4/python-lz4
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-devel
e0748709 21BuildRequires: python-pkgconfig
4ed00615
AM
22%if %{with tests}
23BuildRequires: python-future
e0748709 24BuildRequires: python-psutil
4ed00615
AM
25BuildRequires: python-pytest-cov
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-devel
e0748709 30BuildRequires: python3-pkgconfig
4ed00615
AM
31%if %{with tests}
32BuildRequires: python3-future
e0748709 33BuildRequires: python3-psutil
4ed00615
AM
34BuildRequires: python3-pytest-cov
35%endif
36%endif
37BuildRequires: lz4-devel >= 1.7.5
38Requires: python-modules
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42This package provides python bindings for the LZ4 compression library.
43
44%package -n python3-%{module}
45Summary: LZ4 bindings for Python
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-%{module}
50This package provides python bindings for the LZ4 compression library.
51
52%package apidocs
53Summary: %{module} API documentation
54Summary(pl.UTF-8): Dokumentacja API %{module}
55Group: Documentation
56
57%description apidocs
58API documentation for %{module}.
59
60%description apidocs -l pl.UTF-8
61Dokumentacja 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}
76cd docs
77%{__make} -j1 html
78rm -rf _build/html/_sources
79%endif
80
81%install
82rm -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
93rm -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.047335 seconds and 4 git commands to generate.