]> git.pld-linux.org Git - packages/python-acme.git/blame - python-acme.spec
- up to 1.27.0
[packages/python-acme.git] / python-acme.spec
CommitLineData
27c184a9
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
f9452c09 4%bcond_with tests # do not perform "make test"
27c184a9
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
52446859
AM
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
13%define six_ver 1.9.0
14
27c184a9
ER
15%define module acme
16Summary: Python library for the ACME protocol
17Name: python-%{module}
465cc2ee
JR
18Version: 1.27.0
19Release: 1
27c184a9
ER
20License: Apache v2.0
21Group: Libraries/Python
22Source0: https://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
465cc2ee 23# Source0-md5: 3d950fd6465f8e85800a62eb7e76be19
27c184a9
ER
24URL: https://pypi.python.org/pypi/acme
25BuildRequires: rpm-pythonprov
26BuildRequires: rpmbuild(macros) >= 1.713
27%if %{with python2}
52446859 28BuildRequires: python-cryptography >= %{cryptography_ver}
27c184a9 29BuildRequires: python-devel
52446859 30BuildRequires: python-pyOpenSSL >= %{pyopenssl_ver}
27c184a9 31BuildRequires: python-pyrfc3339
52446859 32BuildRequires: python-requests >= %{requests_ver}
d1b21672 33BuildRequires: python-sphinx_rtd_theme
27c184a9
ER
34BuildRequires: sphinx-pdg
35%if %{with tests}
52446859
AM
36BuildRequires: python-josepy >= %{josepy_ver}
37BuildRequires: python-mock
27c184a9 38BuildRequires: python-nose
52446859 39BuildRequires: python-requests-toolbelt >= %{requests_toolbelt_ver}
27c184a9
ER
40BuildRequires: python-tox
41%endif
42%endif
43%if %{with python3}
52446859 44BuildRequires: python3-cryptography >= %{cryptography_ver}
27c184a9 45BuildRequires: python3-devel
52446859 46BuildRequires: python3-pyOpenSSL >= %{pyopenssl_ver}
27c184a9 47BuildRequires: python3-pyrfc3339
52446859 48BuildRequires: python3-requests >= %{requests_ver}
d1b21672 49BuildRequires: python3-sphinx_rtd_theme
27c184a9 50%if %{with tests}
52446859
AM
51BuildRequires: python3-josepy >= %{josepy_ver}
52BuildRequires: python3-mock
27c184a9 53BuildRequires: python3-nose
52446859 54BuildRequires: python3-requests-toolbelt >= %{requests_toolbelt_ver}
27c184a9
ER
55BuildRequires: python3-tox
56%endif
57%endif
52446859
AM
58Requires: python-cryptography >= %{cryptography_ver}
59Requires: python-pyOpenSSL >= %{pyopenssl_ver}
27c184a9
ER
60Requires: python-pyasn1
61Requires: python-pyrfc3339
62Requires: python-pytz
52446859
AM
63Requires: python-requests >= %{requests_ver}
64Requires: python-requests-toolbelt >= %{requests_toolbelt_ver}
65Requires: python-six >= %{six_ver}
27c184a9
ER
66Suggests: python-acme-doc
67BuildArch: noarch
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70%description
71Python 2 library for use of the Automatic Certificate Management
72Environment protocol as defined by the IETF. It's used by the Let's
73Encrypt project.
74
75%package -n python3-acme
76Summary: Python library for the ACME protocol
77Group: Libraries/Python
52446859
AM
78Requires: python3-cryptography >= %{cryptography_ver}
79Requires: python3-josepy >= %{josepy_ver}
80Requires: python3-pyOpenSSL >= %{pyopenssl_ver}
27c184a9
ER
81Requires: python3-pyasn1
82Requires: python3-pyrfc3339
83Requires: python3-pytz
52446859
AM
84Requires: python3-requests >= %{requests_ver}
85Requires: python3-requests-toolbelt >= %{requests_toolbelt_ver}
86Requires: python3-six >= %{six_ver}
27c184a9
ER
87Suggests: python-acme-doc
88
89%description -n python3-acme
90Python 3 library for use of the Automatic Certificate Management
91Environment protocol as defined by the IETF. It's used by the Let's
92Encrypt project.
93
94%package doc
95Summary: Documentation for python-acme libraries
a1786708 96Group: Documentation
27c184a9
ER
97
98%description doc
99Documentation for the ACME python libraries
100
101%prep
102%setup -q -n %{module}-%{version}
103
104%build
105%if %{with python2}
106%py_build %{?with_tests:test}
107%endif
108
109%if %{with python3}
110%py3_build %{?with_tests:test}
111%endif
112
113%if %{with doc}
114%{__make} -C docs html
27c184a9
ER
115
116# Clean up stuff we don't need for docs
117rm -rf docs/_build/html/{.buildinfo,_sources}
27c184a9
ER
118%endif
119
120%install
121rm -rf $RPM_BUILD_ROOT
27c184a9
ER
122
123%if %{with python2}
124%py_install
125%endif
126
52446859
AM
127%if %{with python3}
128%py3_install
129%endif
130
27c184a9
ER
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python2}
135%files
136%defattr(644,root,root,755)
137%doc README.rst LICENSE.txt
138%{py_sitescriptdir}/%{module}
139%{py_sitescriptdir}/%{module}-%{version}*.egg-info
27c184a9
ER
140%endif
141
142%if %{with python3}
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
148%endif
149
150%if %{with doc}
151%files doc
152%defattr(644,root,root,755)
153%doc docs/_build/html/*
154%endif
This page took 0.207329 seconds and 4 git commands to generate.