]> git.pld-linux.org Git - SPECS.git/blob - python-pyaes.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-pyaes.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
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  pyaes
8 Summary:        Pure-Python implementation of AES block-cipher and common modes of operation
9 # Summary(pl.UTF-8):    -
10 Name:           python-%{module}
11 Version:        1.6.0
12 Release:        4
13 License:        MIT
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/63/31/6768a72cdca5dbd299ae798b690801e6c9c2f018332eec3c5fca79370dba/pyaes-%{version}.tar.gz
16 # Source0-md5:  516d3869e62e661031635270348193fe
17 URL:            -
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules
26 BuildRequires:  python3-setuptools
27 %endif
28 # when using /usr/bin/env or other in-place substitutions
29 #BuildRequires: sed >= 4.0
30 # replace with other requires if defined in setup.py
31 Requires:       python-modules
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Pure-Python implementation of AES block-cipher and common modes of
37 operation.
38
39 # %description -l pl.UTF-8
40
41 %package -n python3-%{module}
42 Summary:        -
43 Summary(pl.UTF-8):      -
44 Group:          Libraries/Python
45 Requires:       python3-modules
46
47 %description -n python3-%{module}
48
49 %description -n python3-%{module} -l pl.UTF-8
50
51 %package apidocs
52 Summary:        %{module} API documentation
53 Summary(pl.UTF-8):      Dokumentacja API %{module}
54 Group:          Documentation
55
56 %description apidocs
57 API documentation for %{module}.
58
59 %description apidocs -l pl.UTF-8
60 Dokumentacja API %{module}.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build %{?with_tests:test}
68 %endif
69
70 %if %{with python3}
71 %py3_build %{?with_tests:test}
72 %endif
73
74 %if %{with doc}
75 cd docs
76 %{__make} -j1 html
77 rm -rf _build/html/_sources
78 %endif
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 %if %{with python2}
84 %py_install
85
86 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
87 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %doc README.md
103 %{py_sitescriptdir}/%{module}
104 %{py_sitescriptdir}/%{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.md
111 %{py3_sitescriptdir}/%{module}
112 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
113 %endif
114
115 %if %{with doc}
116 %files apidocs
117 %defattr(644,root,root,755)
118 %doc docs/_build/html/*
119 %endif
This page took 1.392867 seconds and 3 git commands to generate.