]> git.pld-linux.org Git - packages/python-authres.git/blob - python-authres.spec
- cleanup, added descriptions and tests
[packages/python-authres.git] / python-authres.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # doctests
6
7 %define         module          authres
8 Summary:        Authentication Results Header Module
9 Summary(pl.UTF-8):      Moduł nagłówków Authentication Results
10 Name:           python-%{module}
11 Version:        1.2.0
12 Release:        2
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 Source0:        https://files.pythonhosted.org/packages/source/a/authres/%{module}-%{version}.tar.gz
16 # Source0-md5:  b24ee2541d74eac661fde5c8c27da689
17 URL:            https://launchpad.net/authentication-results-python
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.2
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.6
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Package for parsing "Authentication-Results" headers as defined in RFC
34 5451.
35
36 %description -l pl.UTF-8
37 Pakiet do analizy nagłówków "Authentication-Results", zdefiniowanych w
38 RFC 5451.
39
40 %package -n python3-%{module}
41 Summary:        Authentication Results Header Module
42 Summary(pl.UTF-8):      Moduł nagłówków Authentication Results
43 Group:          Libraries/Python
44 Requires:       python3-modules >= 1:3.2
45
46 %description -n python3-%{module}
47 Package for parsing "Authentication-Results" headers as defined in RFC
48 5451.
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Pakiet do analizy nagłówków "Authentication-Results", zdefiniowanych w
52 RFC 5451.
53
54 %prep
55 %setup -q -n %{module}-%{version}
56
57 %build
58 %if %{with python2}
59 %py_build
60
61 %if %{with tests}
62 %{__python} -m authres
63 %endif
64 %endif
65
66 %if %{with python3}
67 %py3_build
68
69 %if %{with tests}
70 %{__python3} -m authres
71 %endif
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %if %{with python2}
78 %py_install
79
80 %py_postclean
81 %endif
82
83 %if %{with python3}
84 %py3_install
85 %endif
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %files
92 %defattr(644,root,root,755)
93 %doc CHANGES README
94 %{py_sitescriptdir}/authres
95 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
96 %endif
97
98 %if %{with python3}
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
101 %doc CHANGES README
102 %{py3_sitescriptdir}/authres
103 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
104 %endif
This page took 0.189632 seconds and 3 git commands to generate.