]>
Commit | Line | Data |
---|---|---|
e5ec42eb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | ||
e5ec42eb JB |
6 | %define module acme |
7 | Summary: Python library for the ACME protocol | |
8 | Summary(pl.UTF-8): Biblioteka Pythona do protokołu ACME | |
9 | Name: python3-%{module} | |
5ced983d | 10 | Version: 1.32.0 |
e5ec42eb JB |
11 | Release: 1 |
12 | License: Apache v2.0 | |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/acme/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/a/acme/%{module}-%{version}.tar.gz | |
5ced983d | 16 | # Source0-md5: ff30c912210078136dca039370aab100 |
e5ec42eb JB |
17 | URL: https://pypi.org/project/acme/ |
18 | BuildRequires: python3-devel >= 1:3.7 | |
19 | BuildRequires: python3-setuptools >= 1:41.6 | |
20 | BuildRequires: rpm-pythonprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.714 | |
22 | %if %{with doc} || %{with tests} | |
c8a300c9 JB |
23 | BuildRequires: python3-cryptography >= 2.5 |
24 | BuildRequires: python3-josepy >= 1.13 | |
5ced983d | 25 | BuildRequires: python3-pyOpenSSL >= 17.5 |
e5ec42eb JB |
26 | BuildRequires: python3-pyrfc3339 |
27 | BuildRequires: python3-pytz >= 2019.3 | |
c8a300c9 JB |
28 | BuildRequires: python3-requests >= 2.20 |
29 | BuildRequires: python3-requests-toolbelt >= 0.3 | |
e5ec42eb JB |
30 | %endif |
31 | %if %{with tests} | |
32 | BuildRequires: python3-pytest | |
33 | %endif | |
34 | %if %{with doc} | |
35 | BuildRequires: python3-sphinx_rtd_theme | |
36 | BuildRequires: sphinx-pdg-3 >= 1.0 | |
37 | %endif | |
e5ec42eb JB |
38 | Suggests: python3-acme-doc |
39 | BuildArch: noarch | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | Python library for use of the Automatic Certificate Management | |
44 | Environment protocol as defined by the IETF. It's used by the Let's | |
45 | Encrypt project. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Biblioteka Pythona do korzystania z protokołu Automatic Certificate | |
49 | Management Environment (środowiska automatycznego zarządzania | |
50 | certyfikatami) zdefiniowanego przez IETF. Jest używana przez projekt | |
51 | Let's Encrypt. | |
52 | ||
53 | %package doc | |
54 | Summary: Documentation for python-acme library | |
55 | Summary(pl.UTF-8): Dokumentacja do biblioteki python-acme | |
56 | Group: Documentation | |
57 | ||
58 | %description doc | |
59 | Documentation for the ACME Python library. | |
60 | ||
61 | %description doc -l pl.UTF-8 | |
62 | Dokumentacja do biblioteki Pythona ACME. | |
63 | ||
64 | %prep | |
65 | %setup -q -n %{module}-%{version} | |
66 | ||
67 | %build | |
68 | %py3_build | |
69 | ||
70 | %if %{with tests} | |
71 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
72 | PYTHONPATH=$(pwd) \ | |
73 | %{__python3} -m pytest tests | |
74 | %endif | |
75 | ||
76 | %if %{with doc} | |
77 | %{__make} -C docs html \ | |
78 | SPHINXBUILD=sphinx-build-3 | |
79 | %endif | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %py3_install | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc README.rst | |
92 | %{py3_sitescriptdir}/%{module} | |
93 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
94 | ||
95 | %if %{with doc} | |
96 | %files doc | |
97 | %defattr(644,root,root,755) | |
98 | %doc docs/_build/html/{_modules,_static,api,man,*.html,*.js} | |
99 | %endif |