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