]>
Commit | Line | Data |
---|---|---|
915f6045 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # do build doc (missing deps) | |
4 | %bcond_with tests # do perform "make test" (missing deps) | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: OpenStack Image API Client Library | |
9 | Name: python-glanceclient | |
10 | Version: 2.8.0 | |
71dc98d2 | 11 | Release: 5 |
915f6045 JK |
12 | License: Apache |
13 | Group: Libraries/Python | |
14 | Source0: https://files.pythonhosted.org/packages/source/p/python-glanceclient/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 9504fa42fb8327f2d5a616bab8066006 | |
16 | URL: https://pypi.python.org/pypi/python-glanceclient | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
19 | %if %{with python2} | |
20 | BuildRequires: python-pbr >= 2.0.0 | |
21 | BuildRequires: python-setuptools | |
22 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-pbr >= 2.0.0 | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
27 | Requires: python-babel >= 2.3.4 | |
28 | Requires: python-keystoneauth1 >= 3.0.1 | |
29 | Requires: python-oslo.i18n >= 2.1.0 | |
30 | Requires: python-oslo.utils >= 3.20.0 | |
31 | Requires: python-pbr >= 2.0.0 | |
32 | Requires: python-prettytable >= 0.7.1 | |
33 | Requires: python-pyOpenSSL >= 0.14 | |
34 | Requires: python-requests >= 2.14.2 | |
35 | Requires: python-six >= 1.9.0 | |
36 | Requires: python-warlock >= 1.0.1 | |
37 | Requires: python-wrapt >= 1.7.0 | |
38 | BuildArch: noarch | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | This is a client library for Glance built on the OpenStack Images API. | |
43 | ||
44 | %package -n python3-glanceclient | |
45 | Summary: OpenStack Image API Client Library | |
46 | Group: Libraries/Python | |
47 | Requires: python3-babel >= 2.3.4 | |
48 | Requires: python3-keystoneauth1 >= 3.0.1 | |
49 | Requires: python3-oslo.i18n >= 2.1.0 | |
50 | Requires: python3-oslo.utils >= 3.20.0 | |
51 | Requires: python3-pbr >= 2.0.0 | |
52 | Requires: python3-prettytable >= 0.7.1 | |
53 | Requires: python3-pyOpenSSL >= 0.14 | |
54 | Requires: python3-requests >= 2.14.2 | |
55 | Requires: python3-six >= 1.9.0 | |
56 | Requires: python3-warlock >= 1.0.1 | |
57 | Requires: python3-wrapt >= 1.7.0 | |
58 | ||
59 | %description -n python3-glanceclient | |
60 | This is a client library for Glance built on the OpenStack Images API. | |
61 | ||
62 | %package -n glanceclient | |
63 | Summary: OpenStack Image API Client | |
64 | Group: Libraries/Python | |
65 | %if %{with python3} | |
66 | Requires: python3-glanceclient = %{version}-%{release} | |
67 | %else | |
68 | Requires: %{name} = %{version}-%{release} | |
69 | %endif | |
70 | ||
71 | %description -n glanceclient | |
72 | This is a client for Glance built on the OpenStack Images API. | |
73 | ||
74 | %package apidocs | |
75 | Summary: API documentation for Python glanceclient module | |
76 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona glanceclient | |
77 | Group: Documentation | |
78 | ||
79 | %description apidocs | |
80 | API documentation for Pythona glanceclient module. | |
81 | ||
82 | %description apidocs -l pl.UTF-8 | |
83 | Dokumentacja API modułu Pythona glanceclient. | |
84 | ||
85 | %prep | |
86 | %setup -q | |
87 | ||
88 | %build | |
89 | %if %{with python2} | |
90 | %py_build %{?with_tests:test} | |
91 | %endif | |
92 | ||
93 | %if %{with python3} | |
94 | %py3_build %{?with_tests:test} | |
95 | %endif | |
96 | ||
97 | %if %{with doc} | |
98 | cd doc | |
99 | %{__make} -j1 html | |
100 | rm -rf _build/html/_sources | |
101 | %endif | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %if %{with python2} | |
107 | %py_install | |
108 | ||
109 | %py_postclean | |
110 | %endif | |
111 | ||
112 | %if %{with python3} | |
113 | %py3_install | |
114 | %endif | |
115 | ||
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %if %{with python2} | |
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS ChangeLog README.rst | |
123 | %{py_sitescriptdir}/glanceclient | |
124 | %{py_sitescriptdir}/python_glanceclient-%{version}-py*.egg-info | |
125 | %endif | |
126 | ||
127 | %if %{with python3} | |
128 | %files -n python3-glanceclient | |
129 | %defattr(644,root,root,755) | |
130 | %doc AUTHORS ChangeLog README.rst | |
131 | %{py3_sitescriptdir}/glanceclient | |
132 | %{py3_sitescriptdir}/python_glanceclient-%{version}-py*.egg-info | |
133 | %endif | |
134 | ||
135 | %files -n glanceclient | |
136 | %defattr(644,root,root,755) | |
137 | %doc AUTHORS ChangeLog README.rst | |
138 | %attr(755,root,root) %{_bindir}/glance | |
139 | ||
140 | %if %{with doc} | |
141 | %files apidocs | |
142 | %defattr(644,root,root,755) | |
143 | %doc doc/_build/html/* | |
144 | %endif |