]> git.pld-linux.org Git - packages/python-trustme.git/blame - python-trustme.spec
rebuild with tests and docs
[packages/python-trustme.git] / python-trustme.spec
CommitLineData
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
8Summary: Number 1 quality TLS certs while you wait, for the discerning tester
9Summary(pl.UTF-8): Najlepsze certyfikaty TLS dla wnikliwych testerów
10Name: python-trustme
11Version: 0.6.0
8d5f6d33 12Release: 4
fc185735
JB
13License: Apache v2.0 or MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/trustme/
16Source0: https://files.pythonhosted.org/packages/source/t/trustme/trustme-%{version}.tar.gz
17# Source0-md5: 4f354b9f9563a0f9bd05bb189a713afd
18URL: https://pypi.org/project/trustme/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-cryptography >= 2.8
24BuildRequires: python-futures >= 3.1.1
25BuildRequires: python-idna >= 2.8
26BuildRequires: python-ipaddress
27BuildRequires: python-more_itertools >= 5.0.0
28BuildRequires: python-pyOpenSSL >= 19.1.0
29# >=4.6.3 specified
30BuildRequires: python-pytest >= 3
31BuildRequires: python-service_identity >= 18.1.0
32%endif
33%endif
34%if %{with python3}
35BuildRequires: python3-modules >= 1:3.5
36BuildRequires: python3-setuptools
37%if %{with tests}
38BuildRequires: python3-cryptography >= 2.8
39BuildRequires: python3-idna >= 2.8
40BuildRequires: python3-more_itertools >= 5.0.0
41BuildRequires: python3-pyOpenSSL >= 19.1.0
42# >=4.6.3 specified
43BuildRequires: python3-pytest >= 3
44BuildRequires: python3-service_identity >= 18.1.0
45%endif
46%endif
47BuildRequires: rpm-pythonprov
48BuildRequires: rpmbuild(macros) >= 1.714
49%if %{with doc}
50BuildRequires: python3-sphinxcontrib-trio
51BuildRequires: sphinx-pdg-3
52%endif
53Requires: python-modules >= 1:2.7
54BuildArch: noarch
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57%description
58trustme is a tiny Python package that does one thing: it gives you a
59fake certificate authority (CA) that you can use to generate fake TLS
60certs to use in your tests. Well, technically they're real certs,
61they're just signed by your CA, which nobody trusts. But you can trust
62it.
63
64%description -l pl.UTF-8
65trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe
66CA (certificate authority), którego można używać do generowania
67fałszywych certyfikatów do używania w testach. Właściwie, technicznie
68są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA,
69któremu nikt nie ufa. Ale samemu można im zaufać.
70
71%package -n python3-trustme
72Summary: Number 1 quality TLS certs while you wait, for the discerning tester
73Summary(pl.UTF-8): Najlepsze certyfikaty TLS dla wnikliwych testerów
74Group: Libraries/Python
75Requires: python3-modules >= 1:3.5
76
77%description -n python3-trustme
78trustme is a tiny Python package that does one thing: it gives you a
79fake certificate authority (CA) that you can use to generate fake TLS
80certs to use in your tests. Well, technically they're real certs,
81they're just signed by your CA, which nobody trusts. But you can trust
82it.
83
84%description -n python3-trustme -l pl.UTF-8
85trustme to mały pakiet Pythona do jednego zadania: udostępnia fałszywe
86CA (certificate authority), którego można używać do generowania
87fałszywych certyfikatów do używania w testach. Właściwie, technicznie
88są to rzeczywiste certyfikaty, ale są podpisane tylko przez własne CA,
89któremu nikt nie ufa. Ale samemu można im zaufać.
90
91%package apidocs
92Summary: API documentation for Python trustme module
93Summary(pl.UTF-8): Dokumentacja API modułu Pythona trustme
94Group: Documentation
95
96%description apidocs
97API documentation for Python trustme module.
98
99%description apidocs -l pl.UTF-8
100Dokumentacja 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
128rm -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
141rm -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
This page took 0.165309 seconds and 4 git commands to generate.