]> git.pld-linux.org Git - packages/python-lz4.git/blame - python-lz4.spec
- initial
[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
11Release: 1
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
21%if %{with tests}
22BuildRequires: python-future
23BuildRequires: python-pytest-cov
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28%if %{with tests}
29BuildRequires: python3-future
30BuildRequires: python3-pytest-cov
31%endif
32%endif
33BuildRequires: lz4-devel >= 1.7.5
34Requires: python-modules
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38This package provides python bindings for the LZ4 compression library.
39
40%package -n python3-%{module}
41Summary: LZ4 bindings for Python
42Group: Libraries/Python
43Requires: python3-modules
44
45%description -n python3-%{module}
46This package provides python bindings for the LZ4 compression library.
47
48%package apidocs
49Summary: %{module} API documentation
50Summary(pl.UTF-8): Dokumentacja API %{module}
51Group: Documentation
52
53%description apidocs
54API documentation for %{module}.
55
56%description apidocs -l pl.UTF-8
57Dokumentacja 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}
72cd docs
73%{__make} -j1 html
74rm -rf _build/html/_sources
75%endif
76
77%install
78rm -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
89rm -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.093869 seconds and 4 git commands to generate.