]> git.pld-linux.org Git - SPECS.git/blob - python-siphashc.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-siphashc.spec
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
7 %define         module          siphashc
8 %define         egg_name        siphashc
9 %define         pypi_name       siphashc
10 Summary:        Python module for siphash
11 Name:           python-%{pypi_name}
12 Version:        0.8
13 Release:        4
14 License:        MIT
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  f2078b9c12d4650a67ad29ab4c63d8cc
18 URL:            https://github.com/WeblateOrg/siphashc
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules
30 Obsoletes:      python-siphashc3
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Python module for siphash, based on floodberry's version.
35
36 %package -n python3-%{pypi_name}
37 Summary:        Python module for siphash
38 Group:          Libraries/Python
39 Requires:       python3-modules
40 Obsoletes:      python3-siphashc3
41
42 %description -n python3-%{pypi_name}
43 Python module for siphash, based on floodberry's version.
44
45 %prep
46 %setup -q -n %{pypi_name}-%{version}
47
48 # Remove bundled egg-info
49 rm -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}
61 cd docs
62 %{__make} -j1 html
63 rm -rf _build/html/_sources
64 %endif
65
66 %install
67 rm -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
79 rm -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.542146 seconds and 3 git commands to generate.