]>
Commit | Line | Data |
---|---|---|
e28bd805 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 Command-line Client | |
9 | Name: python-openstackclient | |
10 | Version: 3.12.0 | |
a19c8710 | 11 | Release: 8 |
e28bd805 JK |
12 | License: Apache |
13 | Group: Libraries/Python | |
14 | Source0: http://tarballs.openstack.org/python-openstackclient/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 09020f1e10d8b6afe0715c17b389b3c0 | |
16 | URL: https://docs.openstack.org/python-openstackclient/latest/ | |
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 | %if %{with tests} | |
23 | BuildRequires: python-babel >= 2.3.4 | |
24 | BuildRequires: python-cinderclient >= 3.0.0 | |
25 | BuildRequires: python-cliff >= 2.8.0 | |
26 | BuildRequires: python-glanceclient >= 2.7.0 | |
27 | BuildRequires: python-keystoneauth1 >= 3.0.1 | |
28 | BuildRequires: python-keystoneclient >= 3.8.0 | |
29 | BuildRequires: python-novaclient >= 9.0.0 | |
30 | BuildRequires: python-openstacksdk >= 0.9.17 | |
31 | BuildRequires: python-osc-lib >= 1.7.0 | |
32 | BuildRequires: python-oslo.i18n >= 2.10 | |
33 | BuildRequires: python-oslo.utils >= 3.20.0 | |
34 | BuildRequires: python-six >= 1.9.0 | |
35 | %endif | |
36 | %endif | |
37 | %if %{with python3} | |
38 | BuildRequires: python3-pbr >= 2.0.0 | |
39 | BuildRequires: python3-setuptools | |
40 | %if %{with tests} | |
41 | BuildRequires: python-six >= 1.9.0 | |
42 | BuildRequires: python3-babel >= 2.3.4 | |
43 | BuildRequires: python3-cinderclient >= 3.0.0 | |
44 | BuildRequires: python3-cliff >= 2.8.0 | |
45 | BuildRequires: python3-glanceclient >= 2.7.0 | |
46 | BuildRequires: python3-keystoneauth1 >= 3.0.1 | |
47 | BuildRequires: python3-keystoneclient >= 3.8.0 | |
48 | BuildRequires: python3-novaclient >= 9.0.0 | |
49 | BuildRequires: python3-openstacksdk >= 0.9.17 | |
50 | BuildRequires: python3-osc-lib >= 1.7.0 | |
51 | BuildRequires: python3-oslo.i18n >= 2.10 | |
52 | BuildRequires: python3-oslo.utils >= 3.20.0 | |
53 | BuildRequires: python3-six >= 1.9.0 | |
54 | %endif | |
55 | %endif | |
56 | Requires: python-babel >= 2.3.4 | |
57 | Requires: python-cinderclient >= 3.0.0 | |
58 | Requires: python-cliff >= 2.8.0 | |
59 | Requires: python-glanceclient >= 2.7.0 | |
60 | Requires: python-keystoneauth1 >= 3.0.1 | |
61 | Requires: python-keystoneclient >= 3.8.0 | |
62 | Requires: python-novaclient >= 9.0.0 | |
63 | Requires: python-openstacksdk >= 0.9.17 | |
64 | Requires: python-osc-lib >= 1.7.0 | |
65 | Requires: python-oslo.i18n >= 2.10 | |
66 | Requires: python-oslo.utils >= 3.20.0 | |
67 | Requires: python-six >= 1.9.0 | |
68 | BuildArch: noarch | |
69 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
70 | ||
71 | %description | |
72 | OpenStack Command-line Client. | |
73 | ||
74 | This package contains the Python modules, install 'openstackclient' | |
75 | for the actual tool. | |
76 | ||
77 | %package -n python3-openstackclient | |
78 | Summary: OpenStack Command-line Client | |
79 | Group: Libraries/Python | |
ec0793a7 JK |
80 | Requires: python3-babel >= 2.3.4 |
81 | Requires: python3-cinderclient >= 3.0.0 | |
82 | Requires: python3-cliff >= 2.8.0 | |
83 | Requires: python3-glanceclient >= 2.7.0 | |
84 | Requires: python3-keystoneauth1 >= 3.0.1 | |
85 | Requires: python3-keystoneclient >= 3.8.0 | |
86 | Requires: python3-novaclient >= 9.0.0 | |
87 | Requires: python3-openstacksdk >= 0.9.17 | |
88 | Requires: python3-osc-lib >= 1.7.0 | |
89 | Requires: python3-oslo.i18n >= 2.10 | |
90 | Requires: python3-oslo.utils >= 3.20.0 | |
91 | Requires: python3-six >= 1.9.0 | |
e28bd805 JK |
92 | |
93 | %description -n python3-openstackclient | |
94 | OpenStack Command-line Client. | |
95 | ||
96 | This package contains the Python modules, install 'openstackclient' | |
97 | for the actual tool. | |
98 | ||
99 | %package -n openstackclient | |
100 | Summary: OpenStack Command-line Client | |
101 | Group: Applications | |
102 | %if %{with python3} | |
103 | Requires: python3-openstackclient = %{version}-%{release} | |
104 | %else | |
105 | Requires: %{name} = %{version}-%{release} | |
106 | %endif | |
107 | ||
108 | %description -n openstackclient | |
109 | OpenStack Command-line Client. | |
110 | ||
111 | %prep | |
112 | %setup -q | |
113 | ||
114 | %build | |
115 | %if %{with python2} | |
116 | %py_build %{?with_tests:test} | |
117 | %endif | |
118 | ||
119 | %if %{with python3} | |
120 | %py3_build %{?with_tests:test} | |
121 | %endif | |
122 | ||
123 | %if %{with doc} | |
124 | cd docs | |
125 | %{__make} -j1 html | |
126 | rm -rf _build/html/_sources | |
127 | %endif | |
128 | ||
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %if %{with python2} | |
133 | %py_install | |
134 | ||
135 | %py_postclean | |
136 | %endif | |
137 | ||
138 | %if %{with python3} | |
139 | %py3_install | |
140 | %endif | |
141 | ||
142 | %clean | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
145 | %if %{with python2} | |
146 | %files | |
147 | %defattr(644,root,root,755) | |
148 | %doc AUTHORS ChangeLog README.rst | |
149 | %{py_sitescriptdir}/openstackclient | |
150 | %{py_sitescriptdir}/python_openstackclient-%{version}-py*.egg-info | |
151 | %endif | |
152 | ||
153 | %if %{with python3} | |
154 | %files -n python3-openstackclient | |
155 | %defattr(644,root,root,755) | |
156 | %doc AUTHORS ChangeLog README.rst | |
157 | %{py3_sitescriptdir}/openstackclient | |
158 | %{py3_sitescriptdir}/python_openstackclient-%{version}-py*.egg-info | |
159 | %endif | |
160 | ||
161 | %files -n openstackclient | |
162 | %defattr(644,root,root,755) | |
163 | %doc AUTHORS ChangeLog README.rst | |
164 | %attr(755,root,root) %{_bindir}/* |