]> git.pld-linux.org Git - packages/python-cinderclient.git/blob - python-cinderclient.spec
rebuild with python 3.10
[packages/python-cinderclient.git] / python-cinderclient.spec
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 Block Storage API Client Library
9 Name:           python-cinderclient
10 Version:        3.1.0
11 Release:        5
12 License:        Apache
13 Group:          Libraries/Python
14 Source0:        https://files.pythonhosted.org/packages/source/p/python-cinderclient/%{name}-%{version}.tar.gz
15 # Source0-md5:  476881992a4b28b458a513dea61fb17f
16 URL:            https://pypi.python.org/pypi/python-cinderclient
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-simplejson >= 2.2.0
34 Requires:       python-six >= 1.9.0
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This is a client for the OpenStack Cinder API. There's a Python API
40 (the cinderclient module), and a command-line script (cinder). Each
41 implements 100% of the OpenStack Cinder API.
42
43 %package -n python3-cinderclient
44 Summary:        OpenStack Block Storage API Client Library
45 Group:          Libraries/Python
46 Requires:       python3-babel >= 2.3.4
47 Requires:       python3-keystoneauth1 >= 3.0.1
48 Requires:       python3-oslo.i18n >= 2.1.0
49 Requires:       python3-oslo.utils >= 3.20.0
50 Requires:       python3-prettytable >= 0.7.1
51 Requires:       python3-simplejson >= 2.2.0
52 Requires:       python3-six >= 1.9.0
53
54 %description -n python3-cinderclient
55 This is a client for the OpenStack Cinder API. There's a Python API
56 (the cinderclient module), and a command-line script (cinder). Each
57 implements 100% of the OpenStack Cinder API.
58
59 %package -n cinderclient
60 Summary:        OpenStack Block Storage API Client
61 Group:          Applications
62 %if %{with python3}
63 Requires:       python3-cinderclient = %{version}-%{release}
64 %else
65 Requires:       %{name} = %{version}-%{release}
66 %endif
67
68 %description -n cinderclient
69 This is a client for the OpenStack Cinder API.
70
71 %package apidocs
72 Summary:        API documentation for Python cinderclient module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona cinderclient
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Pythona cinderclient module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona cinderclient.
81
82 %prep
83 %setup -q
84
85 %build
86 %if %{with python2}
87 %py_build %{?with_tests:test}
88 %endif
89
90 %if %{with python3}
91 %py3_build %{?with_tests:test}
92 %endif
93
94 %if %{with doc}
95 cd doc
96 %{__make} -j1 html
97 rm -rf _build/html/_sources
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %py_install
105
106 %py_postclean
107 %endif
108
109 %if %{with python3}
110 %py3_install
111 %endif
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %if %{with python2}
117 %files
118 %defattr(644,root,root,755)
119 %doc AUTHORS ChangeLog README.rst
120 %{py_sitescriptdir}/cinderclient
121 %{py_sitescriptdir}/python_cinderclient-%{version}-py*.egg-info
122 %endif
123
124 %if %{with python3}
125 %files -n python3-cinderclient
126 %defattr(644,root,root,755)
127 %doc AUTHORS ChangeLog README.rst
128 %{py3_sitescriptdir}/cinderclient
129 %{py3_sitescriptdir}/python_cinderclient-%{version}-py*.egg-info
130 %endif
131
132 %files -n cinderclient
133 %defattr(644,root,root,755)
134 %doc AUTHORS ChangeLog README.rst
135 %attr(755,root,root) %{_bindir}/cinder
136
137 %if %{with doc}
138 %files apidocs
139 %defattr(644,root,root,755)
140 %doc doc/_build/html/*
141 %endif
This page took 0.090949 seconds and 3 git commands to generate.