]> git.pld-linux.org Git - SPECS.git/blob - python-trustme.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / python-trustme.spec
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.9.0
12 Release:        1
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:  0e4d698e5aecaf8306cf440bf3dcbbe0
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 BuildRequires:  python-pytest >= 4.6.3
30 BuildRequires:  python-service_identity >= 18.1.0
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.6
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-cryptography >= 2.8
38 BuildRequires:  python3-idna >= 2.8
39 BuildRequires:  python3-more_itertools >= 5.0.0
40 BuildRequires:  python3-pyOpenSSL >= 19.1.0
41 BuildRequires:  python3-pytest >= 4.6.3
42 BuildRequires:  python3-service_identity >= 18.1.0
43 %endif
44 %endif
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.714
47 %if %{with doc}
48 BuildRequires:  python3-sphinxcontrib-trio
49 BuildRequires:  sphinx-pdg-3
50 %endif
51 Requires:       python-modules >= 1:2.7
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 trustme is a tiny Python package that does one thing: it gives you a
57 fake certificate authority (CA) that you can use to generate fake TLS
58 certs to use in your tests. Well, technically they're real certs,
59 they're just signed by your CA, which nobody trusts. But you can trust
60 it.
61
62 %description -l pl.UTF-8
63 trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe
64 CA (certificate authority), którego można używać do generowania
65 fałszywych certyfikatów do używania w testach. Właściwie, technicznie
66 są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA,
67 któremu nikt nie ufa. Ale samemu można im zaufać.
68
69 %package -n python3-trustme
70 Summary:        Number 1 quality TLS certs while you wait, for the discerning tester
71 Summary(pl.UTF-8):      Najlepsze certyfikaty TLS dla wnikliwych testerów
72 Group:          Libraries/Python
73 Requires:       python3-modules >= 1:3.6
74
75 %description -n python3-trustme
76 trustme is a tiny Python package that does one thing: it gives you a
77 fake certificate authority (CA) that you can use to generate fake TLS
78 certs to use in your tests. Well, technically they're real certs,
79 they're just signed by your CA, which nobody trusts. But you can trust
80 it.
81
82 %description -n python3-trustme -l pl.UTF-8
83 trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe
84 CA (certificate authority), którego można używać do generowania
85 fałszywych certyfikatów do używania w testach. Właściwie, technicznie
86 są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA,
87 któremu nikt nie ufa. Ale samemu można im zaufać.
88
89 %package apidocs
90 Summary:        API documentation for Python trustme module
91 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona trustme
92 Group:          Documentation
93
94 %description apidocs
95 API documentation for Python trustme module.
96
97 %description apidocs -l pl.UTF-8
98 Dokumentacja API modułu Pythona trustme.
99
100 %prep
101 %setup -q -n trustme-%{version}
102
103 %build
104 %if %{with python2}
105 %py_build
106
107 %if %{with tests}
108 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
109 PYTHONPATH=$(pwd) \
110 %{__python} -m pytest tests
111 %endif
112 %endif
113
114 %if %{with python3}
115 %py3_build
116
117 %if %{with tests}
118 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
119 PYTHONPATH=$(pwd) \
120 %{__python3} -m pytest tests
121 %endif
122 %endif
123
124 %if %{with doc}
125 %{__make} -C docs html \
126         SPHINXBUILD=sphinx-build-3
127 %endif
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %py_install
134
135 %py_postclean
136 %endif
137
138 %if %{with python3}
139 %py3_install
140 %endif
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %if %{with python2}
146 %files
147 %defattr(644,root,root,755)
148 %doc LICENSE LICENSE.MIT README.rst
149 %{py_sitescriptdir}/trustme
150 %{py_sitescriptdir}/trustme-%{version}-py*.egg-info
151 %endif
152
153 %if %{with python3}
154 %files -n python3-trustme
155 %defattr(644,root,root,755)
156 %doc LICENSE LICENSE.MIT README.rst
157 %{py3_sitescriptdir}/trustme
158 %{py3_sitescriptdir}/trustme-%{version}-py*.egg-info
159 %endif
160
161 %if %{with doc}
162 %files apidocs
163 %defattr(644,root,root,755)
164 %doc docs/build/html/{_static,*.html,*.js}
165 %endif
This page took 0.16017 seconds and 3 git commands to generate.