]> git.pld-linux.org Git - packages/python-acme.git/blob - python-acme.spec
- run postclean
[packages/python-acme.git] / python-acme.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
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:           python-%{module}
10 # keep 1.11.x here for python2 support; see python3-acme.spec for python3 versions
11 Version:        1.11.0
12 Release:        1
13 Epoch:          1
14 License:        Apache v2.0
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/acme/
17 Source0:        https://files.pythonhosted.org/packages/source/a/acme/%{module}-%{version}.tar.gz
18 # Source0-md5:  2ea41be3043f0353587274ffbf01032f
19 URL:            https://pypi.org/project/acme/
20 BuildRequires:  python-devel >= 1:2.7
21 BuildRequires:  python-setuptools >= 1:36.2
22 %if %{with doc} || %{with tests}
23 BuildRequires:  python-cryptography >= 1.2.3
24 BuildRequires:  python-josepy >= 1.1
25 BuildRequires:  python-pyOpenSSL >= 0.15.1
26 BuildRequires:  python-pyrfc3339
27 BuildRequires:  python-pytz
28 BuildRequires:  python-requests >= 2.6
29 BuildRequires:  python-requests-toolbelt >= 0.3
30 BuildRequires:  python-six >= 1.9
31 %endif
32 %if %{with tests}
33 BuildRequires:  python-mock
34 BuildRequires:  python-pytest
35 %endif
36 %if %{with doc}
37 BuildRequires:  python-sphinx_rtd_theme
38 BuildRequires:  sphinx-pdg-2 >= 1.0
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 Suggests:       python-acme-doc
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 Python library for use of the Automatic Certificate Management
48 Environment protocol as defined by the IETF. It's used by the Let's
49 Encrypt project.
50
51 %description -l pl.UTF-8
52 Biblioteka Pythona do korzystania z protokołu Automatic Certificate
53 Management Environment (środowiska automatycznego zarządzania
54 certyfikatami) zdefiniowanego przez IETF. Jest używana przez projekt
55 Let's Encrypt.
56
57 %package doc
58 Summary:        Documentation for python-acme library
59 Summary(pl.UTF-8):      Dokumentacja do biblioteki python-acme
60 Group:          Documentation
61
62 %description doc
63 Documentation for the ACME Python library.
64
65 %description doc -l pl.UTF-8
66 Dokumentacja do biblioteki Pythona ACME.
67
68 %prep
69 %setup -q -n %{module}-%{version}
70
71 %build
72 %py_build
73
74 %if %{with tests}
75 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
76 PYTHONPATH=$(pwd) \
77 %{__python} -m pytest tests
78 %endif
79
80 %if %{with doc}
81 %{__make} -C docs html \
82         SPHINXBUILD=sphinx-build-2
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %py_install
89
90 %py_postclean
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(644,root,root,755)
97 %doc README.rst
98 %{py_sitescriptdir}/%{module}
99 %{py_sitescriptdir}/%{module}-%{version}*.egg-info
100
101 %if %{with doc}
102 %files doc
103 %defattr(644,root,root,755)
104 %doc docs/_build/html/{_static,api,man,*.html,*.js}
105 %endif
This page took 0.14628 seconds and 4 git commands to generate.