3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: Python library for the ACME protocol
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 7115ba77709b281ffaa59d853cd5337a
17 URL: https://pypi.python.org/pypi/acme
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.713
21 BuildRequires: python-cryptography
22 BuildRequires: python-devel
23 BuildRequires: python-pyOpenSSL
24 BuildRequires: python-pyrfc3339
25 BuildRequires: python-requests
26 BuildRequires: python-werkzeug
27 BuildRequires: sphinx-pdg
29 BuildRequires: python-ndg_httpsclient
30 BuildRequires: python-nose
31 BuildRequires: python-tox
35 BuildRequires: python3-cryptography
36 BuildRequires: python3-devel
37 BuildRequires: python3-pyOpenSSL
38 BuildRequires: python3-pyrfc3339
39 BuildRequires: python3-requests
40 BuildRequires: python3-werkzeug
42 BuildRequires: python3-ndg_httpsclient
43 BuildRequires: python3-nose
44 BuildRequires: python3-tox
48 BuildRequires: python-sphinxcontrib-programoutput
50 Requires: python-cryptography
51 Requires: python-ndg_httpsclient
52 Requires: python-pyOpenSSL
53 Requires: python-pyasn1
54 Requires: python-pyrfc3339
56 Requires: python-requests
58 Requires: python-werkzeug
59 Suggests: python-acme-doc
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 Python 2 library for use of the Automatic Certificate Management
65 Environment protocol as defined by the IETF. It's used by the Let's
68 %package -n python3-acme
69 Summary: Python library for the ACME protocol
70 Group: Libraries/Python
71 Requires: python3-cryptography
72 Requires: python3-ndg_httpsclient
73 Requires: python3-pyOpenSSL
74 Requires: python3-pyasn1
75 Requires: python3-pyrfc3339
76 Requires: python3-pytz
77 Requires: python3-requests
79 Requires: python3-werkzeug
80 Suggests: python-acme-doc
82 %description -n python3-acme
83 Python 3 library for use of the Automatic Certificate Management
84 Environment protocol as defined by the IETF. It's used by the Let's
88 Summary: Documentation for python-acme libraries
89 Requires: fontawesome-fonts
90 Requires: fontawesome-fonts-web
91 Provides: bundled(inconsolata-fonts)
92 Provides: bundled(jquery)
93 Provides: bundled(lato-fonts)
94 Provides: bundled(robotoslab-fonts)
95 Provides: bundled(underscore)
98 Documentation for the ACME python libraries
101 %setup -q -n %{module}-%{version}
105 %py_build %{?with_tests:test}
109 %py3_build %{?with_tests:test}
113 %{__make} -C docs html
114 # build documentation
115 %{__python} setup.py install --user
117 # Clean up stuff we don't need for docs
118 rm -rf docs/_build/html/{.buildinfo,_sources}
120 # Unbundle fonts already on system
121 # Lato ttf is in texlive but that adds a lot of dependencies (30+MB) for just a font in documentation
122 # and lato is not in it's own -fonts package, only texlive
123 rm -f docs/_build/html/_static/fonts/fontawesome*
124 ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.eot docs/_build/html/_static/fonts/fontawesome-webfont.eot
125 ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg docs/_build/html/_static/fonts/fontawesome-webfont.svg
126 ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf docs/_build/html/_static/fonts/fontawesome-webfont.ttf
127 ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff docs/_build/html/_static/fonts/fontawesome-webfont.woff
131 rm -rf $RPM_BUILD_ROOT
132 # Do python3 first so bin ends up from py2
142 rm -rf $RPM_BUILD_ROOT
146 %defattr(644,root,root,755)
147 %doc README.rst LICENSE.txt
148 %{py_sitescriptdir}/%{module}
149 %{py_sitescriptdir}/%{module}-%{version}*.egg-info
150 %attr(755,root,root) %{_bindir}/jws
154 %files -n python3-acme
155 %defattr(644,root,root,755)
156 %doc README.rst LICENSE.txt
157 %{py3_sitescriptdir}/%{module}
158 %{py3_sitescriptdir}/%{module}-%{version}*.egg-info
163 %defattr(644,root,root,755)
164 %doc docs/_build/html/*