]> git.pld-linux.org Git - packages/python-service_identity.git/blob - python-service_identity.spec
- new
[packages/python-service_identity.git] / python-service_identity.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests (not included in release tarball)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Service identity verification for pyOpenSSL & cryptography
9 Summary(pl.UTF-8):      Weryfikacja tożsamości usługi dla modułów pyOpenSSL i cryptography
10 Name:           python-service_identity
11 Version:        18.1.0
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/service_identity/
16 Source0:        https://files.pythonhosted.org/packages/source/s/service-identity/service_identity-%{version}.tar.gz
17 # Source0-md5:  c6b8bac93e7d899a1da313a19cc6570a
18 URL:            https://pypi.org/project/service_identity/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-attrs >= 16.0.0
24 BuildRequires:  python-cryptography
25 BuildRequires:  python-ipaddress
26 BuildRequires:  python-pyasn1
27 BuildRequires:  python-pyasn1_modules
28 BuildRequires:  python-pytest
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.4
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-attrs >= 16.0.0
36 BuildRequires:  python3-cryptography
37 BuildRequires:  python3-pyasn1
38 BuildRequires:  python3-pyasn1_modules
39 BuildRequires:  python3-pytest
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 %if %{with doc}
45 BuildRequires:  sphinx-pdg
46 %endif
47 Requires:       python-modules >= 1:2.7
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Use this package if:
53 - you use pyOpenSSL and don't want to be MITM'ed or
54 - if you want to verify that a PyCA cryptography certificate is valid
55   for a certain hostname or IP address.
56
57 %description -l pl.UTF-8
58 Ten moduł jest przydatny jeśli:
59 - używamy pyOpenSSL i chcemy uniknąć ataku MITM, lub też
60 - chcemy zweryfikować, że certyfikat PyCA cryptography jest poprawny
61   dla określonej nazwy hosta lub adresu IP.
62
63 %package -n python3-service_identity
64 Summary:        Service identity verification for pyOpenSSL & cryptography
65 Summary(pl.UTF-8):      Weryfikacja tożsamości usługi dla modułów pyOpenSSL i cryptography
66 Group:          Libraries/Python
67 Requires:       python3-modules >= 1:3.4
68
69 %description -n python3-service_identity
70 Use this package if:
71 - you use pyOpenSSL and don't want to be MITM'ed or
72 - if you want to verify that a PyCA cryptography certificate is valid
73   for a certain hostname or IP address.
74
75 %description -n python3-service_identity -l pl.UTF-8
76 Ten moduł jest przydatny jeśli:
77 - używamy pyOpenSSL i chcemy uniknąć ataku MITM, lub też
78 - chcemy zweryfikować, że certyfikat PyCA cryptography jest poprawny
79   dla określonej nazwy hosta lub adresu IP.
80
81 %package apidocs
82 Summary:        API documentation for Python service_identity module
83 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona service_identity
84 Group:          Documentation
85
86 %description apidocs
87 API documentation for Python service_identity module.
88
89 %description apidocs -l pl.UTF-8
90 Dokumentacja API modułu Pythona service_identity.
91
92 %prep
93 %setup -q -n service_identity-%{version}
94
95 %build
96 %if %{with python2}
97 %py_build
98
99 %if %{with tests}
100 %{__python} -m pytest tests
101 %endif
102 %endif
103
104 %if %{with python3}
105 %py3_build
106
107 %if %{with tests}
108 %{__python3} -m pytest tests
109 %endif
110 %endif
111
112 %if %{with doc}
113 %{__make} -C docs html
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %py_install
121
122 %py_postclean
123 %endif
124
125 %if %{with python3}
126 %py3_install
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %files
134 %defattr(644,root,root,755)
135 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
136 %{py_sitescriptdir}/service_identity
137 %{py_sitescriptdir}/service_identity-%{version}-py*.egg-info
138 %endif
139
140 %if %{with python3}
141 %files -n python3-service_identity
142 %defattr(644,root,root,755)
143 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
144 %{py3_sitescriptdir}/service_identity
145 %{py3_sitescriptdir}/service_identity-%{version}-py*.egg-info
146 %endif
147
148 %if %{with doc}
149 %files apidocs
150 %defattr(644,root,root,755)
151 %doc docs/_build/html/{_static,*.html,*.js}
152 %endif
This page took 0.113371 seconds and 3 git commands to generate.