]>
Commit | Line | Data |
---|---|---|
fc185735 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: Number 1 quality TLS certs while you wait, for the discerning tester | |
9 | Summary(pl.UTF-8): Najlepsze certyfikaty TLS dla wnikliwych testerów | |
10 | Name: python-trustme | |
11 | Version: 0.6.0 | |
8d5f6d33 | 12 | Release: 4 |
fc185735 JB |
13 | License: Apache v2.0 or MIT |
14 | Group: Libraries/Python | |
15 | #Source0Download: https://pypi.org/simple/trustme/ | |
16 | Source0: https://files.pythonhosted.org/packages/source/t/trustme/trustme-%{version}.tar.gz | |
17 | # Source0-md5: 4f354b9f9563a0f9bd05bb189a713afd | |
18 | URL: https://pypi.org/project/trustme/ | |
19 | %if %{with python2} | |
20 | BuildRequires: python-modules >= 1:2.7 | |
21 | BuildRequires: python-setuptools | |
22 | %if %{with tests} | |
23 | BuildRequires: python-cryptography >= 2.8 | |
24 | BuildRequires: python-futures >= 3.1.1 | |
25 | BuildRequires: python-idna >= 2.8 | |
26 | BuildRequires: python-ipaddress | |
27 | BuildRequires: python-more_itertools >= 5.0.0 | |
28 | BuildRequires: python-pyOpenSSL >= 19.1.0 | |
29 | # >=4.6.3 specified | |
30 | BuildRequires: python-pytest >= 3 | |
31 | BuildRequires: python-service_identity >= 18.1.0 | |
32 | %endif | |
33 | %endif | |
34 | %if %{with python3} | |
35 | BuildRequires: python3-modules >= 1:3.5 | |
36 | BuildRequires: python3-setuptools | |
37 | %if %{with tests} | |
38 | BuildRequires: python3-cryptography >= 2.8 | |
39 | BuildRequires: python3-idna >= 2.8 | |
40 | BuildRequires: python3-more_itertools >= 5.0.0 | |
41 | BuildRequires: python3-pyOpenSSL >= 19.1.0 | |
42 | # >=4.6.3 specified | |
43 | BuildRequires: python3-pytest >= 3 | |
44 | BuildRequires: python3-service_identity >= 18.1.0 | |
45 | %endif | |
46 | %endif | |
47 | BuildRequires: rpm-pythonprov | |
48 | BuildRequires: rpmbuild(macros) >= 1.714 | |
49 | %if %{with doc} | |
50 | BuildRequires: python3-sphinxcontrib-trio | |
51 | BuildRequires: sphinx-pdg-3 | |
52 | %endif | |
53 | Requires: python-modules >= 1:2.7 | |
54 | BuildArch: noarch | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %description | |
58 | trustme is a tiny Python package that does one thing: it gives you a | |
59 | fake certificate authority (CA) that you can use to generate fake TLS | |
60 | certs to use in your tests. Well, technically they're real certs, | |
61 | they're just signed by your CA, which nobody trusts. But you can trust | |
62 | it. | |
63 | ||
64 | %description -l pl.UTF-8 | |
65 | trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe | |
66 | CA (certificate authority), którego można używać do generowania | |
67 | fałszywych certyfikatów do używania w testach. Właściwie, technicznie | |
68 | są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA, | |
69 | któremu nikt nie ufa. Ale samemu można im zaufać. | |
70 | ||
71 | %package -n python3-trustme | |
72 | Summary: Number 1 quality TLS certs while you wait, for the discerning tester | |
73 | Summary(pl.UTF-8): Najlepsze certyfikaty TLS dla wnikliwych testerów | |
74 | Group: Libraries/Python | |
75 | Requires: python3-modules >= 1:3.5 | |
76 | ||
77 | %description -n python3-trustme | |
78 | trustme is a tiny Python package that does one thing: it gives you a | |
79 | fake certificate authority (CA) that you can use to generate fake TLS | |
80 | certs to use in your tests. Well, technically they're real certs, | |
81 | they're just signed by your CA, which nobody trusts. But you can trust | |
82 | it. | |
83 | ||
84 | %description -n python3-trustme -l pl.UTF-8 | |
85 | trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe | |
86 | CA (certificate authority), którego można używać do generowania | |
87 | fałszywych certyfikatów do używania w testach. Właściwie, technicznie | |
88 | są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA, | |
89 | któremu nikt nie ufa. Ale samemu można im zaufać. | |
90 | ||
91 | %package apidocs | |
92 | Summary: API documentation for Python trustme module | |
93 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona trustme | |
94 | Group: Documentation | |
95 | ||
96 | %description apidocs | |
97 | API documentation for Python trustme module. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API modułu Pythona trustme. | |
101 | ||
102 | %prep | |
103 | %setup -q -n trustme-%{version} | |
104 | ||
105 | %build | |
106 | %if %{with python2} | |
107 | %py_build | |
108 | ||
109 | %if %{with tests} | |
110 | %{__python} -m pytest tests | |
111 | %endif | |
112 | %endif | |
113 | ||
114 | %if %{with python3} | |
115 | %py3_build | |
116 | ||
117 | %if %{with tests} | |
118 | %{__python3} -m pytest tests | |
119 | %endif | |
120 | %endif | |
121 | ||
122 | %if %{with doc} | |
123 | %{__make} -C docs html \ | |
124 | SPHINXBUILD=sphinx-build-3 | |
125 | %endif | |
126 | ||
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %if %{with python2} | |
131 | %py_install | |
132 | ||
133 | %py_postclean | |
134 | %endif | |
135 | ||
136 | %if %{with python3} | |
137 | %py3_install | |
138 | %endif | |
139 | ||
140 | %clean | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %if %{with python2} | |
144 | %files | |
145 | %defattr(644,root,root,755) | |
146 | %doc LICENSE LICENSE.MIT README.rst | |
147 | %{py_sitescriptdir}/trustme | |
148 | %{py_sitescriptdir}/trustme-%{version}-py*.egg-info | |
149 | %endif | |
150 | ||
151 | %if %{with python3} | |
152 | %files -n python3-trustme | |
153 | %defattr(644,root,root,755) | |
154 | %doc LICENSE LICENSE.MIT README.rst | |
155 | %{py3_sitescriptdir}/trustme | |
156 | %{py3_sitescriptdir}/trustme-%{version}-py*.egg-info | |
157 | %endif | |
158 | ||
159 | %if %{with doc} | |
160 | %files apidocs | |
161 | %defattr(644,root,root,755) | |
162 | %doc docs/build/html/{_static,*.html,*.js} | |
163 | %endif |