3 %bcond_without doc # don't build doc
4 %bcond_with tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define cryptography_ver 0.8
9 %define josepy_ver 1.0.0
10 %define pyopenssl_ver 0.13
11 %define requests_ver 2.4.1
12 %define requests_toolbelt_ver 0.3.0
16 Summary: Python library for the ACME protocol
17 Name: python-%{module}
21 Group: Libraries/Python
22 Source0: https://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
23 # Source0-md5: 3502f789350c80e77b15d0aecf2f4ebf
24 URL: https://pypi.python.org/pypi/acme
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.713
28 BuildRequires: python-cryptography >= %{cryptography_ver}
29 BuildRequires: python-devel
30 BuildRequires: python-pyOpenSSL >= %{pyopenssl_ver}
31 BuildRequires: python-pyrfc3339
32 BuildRequires: python-requests >= %{requests_ver}
33 BuildRequires: python-sphinx_rtd_theme
34 BuildRequires: sphinx-pdg
36 BuildRequires: python-josepy >= %{josepy_ver}
37 BuildRequires: python-mock
38 BuildRequires: python-nose
39 BuildRequires: python-requests-toolbelt >= %{requests_toolbelt_ver}
40 BuildRequires: python-tox
44 BuildRequires: python3-cryptography >= %{cryptography_ver}
45 BuildRequires: python3-devel
46 BuildRequires: python3-pyOpenSSL >= %{pyopenssl_ver}
47 BuildRequires: python3-pyrfc3339
48 BuildRequires: python3-requests >= %{requests_ver}
49 BuildRequires: python3-sphinx_rtd_theme
51 BuildRequires: python3-josepy >= %{josepy_ver}
52 BuildRequires: python3-mock
53 BuildRequires: python3-nose
54 BuildRequires: python3-requests-toolbelt >= %{requests_toolbelt_ver}
55 BuildRequires: python3-tox
58 Requires: python-cryptography >= %{cryptography_ver}
59 Requires: python-pyOpenSSL >= %{pyopenssl_ver}
60 Requires: python-pyasn1
61 Requires: python-pyrfc3339
63 Requires: python-requests >= %{requests_ver}
64 Requires: python-requests-toolbelt >= %{requests_toolbelt_ver}
65 Requires: python-six >= %{six_ver}
66 Suggests: python-acme-doc
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71 Python 2 library for use of the Automatic Certificate Management
72 Environment protocol as defined by the IETF. It's used by the Let's
75 %package -n python3-acme
76 Summary: Python library for the ACME protocol
77 Group: Libraries/Python
78 Requires: python3-cryptography >= %{cryptography_ver}
79 Requires: python3-josepy >= %{josepy_ver}
80 Requires: python3-pyOpenSSL >= %{pyopenssl_ver}
81 Requires: python3-pyasn1
82 Requires: python3-pyrfc3339
83 Requires: python3-pytz
84 Requires: python3-requests >= %{requests_ver}
85 Requires: python3-requests-toolbelt >= %{requests_toolbelt_ver}
86 Requires: python3-six >= %{six_ver}
87 Suggests: python-acme-doc
89 %description -n python3-acme
90 Python 3 library for use of the Automatic Certificate Management
91 Environment protocol as defined by the IETF. It's used by the Let's
95 Summary: Documentation for python-acme libraries
99 Documentation for the ACME python libraries
102 %setup -q -n %{module}-%{version}
106 %py_build %{?with_tests:test}
110 %py3_build %{?with_tests:test}
114 %{__make} -C docs html
116 # Clean up stuff we don't need for docs
117 rm -rf docs/_build/html/{.buildinfo,_sources}
121 rm -rf $RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc README.rst LICENSE.txt
138 %{py_sitescriptdir}/%{module}
139 %{py_sitescriptdir}/%{module}-%{version}*.egg-info
143 %files -n python3-acme
144 %defattr(644,root,root,755)
145 %doc README.rst LICENSE.txt
146 %{py3_sitescriptdir}/%{module}
147 %{py3_sitescriptdir}/%{module}-%{version}*.egg-info
152 %defattr(644,root,root,755)
153 %doc docs/_build/html/*