]> git.pld-linux.org Git - packages/python-siphashc.git/blame - python-siphashc.spec
rebuild with tests and docs
[packages/python-siphashc.git] / python-siphashc.spec
CommitLineData
376fbf2d
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
376fbf2d 7%define module siphashc
cffae608
ER
8%define egg_name siphashc
9%define pypi_name siphashc
376fbf2d
ER
10Summary: Python module for siphash
11Name: python-%{pypi_name}
cffae608 12Version: 0.8
7491e71c 13Release: 8
376fbf2d
ER
14License: MIT
15Group: Libraries/Python
16Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
cffae608
ER
17# Source0-md5: f2078b9c12d4650a67ad29ab4c63d8cc
18URL: https://github.com/WeblateOrg/siphashc
376fbf2d
ER
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
29Requires: python-modules
cffae608 30Obsoletes: python-siphashc3
376fbf2d
ER
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Python module for siphash, based on floodberry's version.
35
36%package -n python3-%{pypi_name}
37Summary: Python module for siphash
38Group: Libraries/Python
39Requires: python3-modules
cffae608 40Obsoletes: python3-siphashc3
376fbf2d
ER
41
42%description -n python3-%{pypi_name}
43Python module for siphash, based on floodberry's version.
44
45%prep
46%setup -q -n %{pypi_name}-%{version}
47
48# Remove bundled egg-info
49rm -r %{pypi_name}.egg-info
50
51%build
52%if %{with python2}
53%py_build %{?with_tests:test}
54%endif
55
56%if %{with python3}
57%py3_build %{?with_tests:test}
58%endif
59
60%if %{with doc}
61cd docs
62%{__make} -j1 html
63rm -rf _build/html/_sources
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
68
69%if %{with python2}
70%py_install
71%py_postclean
72%endif
73
74%if %{with python3}
75%py3_install
76%endif
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%files
83%defattr(644,root,root,755)
84%attr(755,root,root) %{py_sitedir}/%{module}.so
85%{py_sitedir}/%{egg_name}-%{version}-py*.egg-info
86%endif
87
88%if %{with python3}
89%files -n python3-%{pypi_name}
90%defattr(644,root,root,755)
91%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
92%{py3_sitedir}/%{egg_name}-%{version}-py*.egg-info
93%endif
This page took 0.078657 seconds and 4 git commands to generate.