]>
Commit | Line | Data |
---|---|---|
466ceb55 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: Client Library for OpenStack Identity | |
9 | Name: python-keystoneclient | |
10 | Version: 3.13.0 | |
4cc731df | 11 | Release: 6 |
466ceb55 JK |
12 | License: Apache |
13 | Group: Libraries/Python | |
14 | Source0: https://files.pythonhosted.org/packages/source/p/python-keystoneclient/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: e9f5d8f1476be5fb835e074b79557c64 | |
16 | URL: https://pypi.python.org/pypi/python-keystoneclient | |
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-debtcollector >= 1.2.0 | |
28 | Requires: python-keystoneauth1 >= 3.0.1 | |
29 | Requires: python-oslo.config >= 4.0.0 | |
30 | Requires: python-oslo.i18n >= 2.1.0 | |
31 | Requires: python-oslo.serialization >= 1.10.0 | |
32 | Requires: python-oslo.utils >= 3.20.0 | |
33 | Requires: python-pbr >= 2.0.0 | |
34 | Requires: python-positional >= 1.1.1 | |
35 | Requires: python-requests >= 2.14.2 | |
36 | Requires: python-six >= 1.9.0 | |
37 | Requires: python-stevedore >= 1.20.0 | |
38 | BuildArch: noarch | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | This is a client for the OpenStack Identity API, implemented by the | |
43 | Keystone team; it contains a Python API (the keystoneclient module) | |
44 | for OpenStack's Identity Service. | |
45 | ||
46 | %package -n python3-keystoneclient | |
47 | Summary: Client Library for OpenStack Identity | |
48 | Group: Libraries/Python | |
49 | Requires: python3-debtcollector >= 1.2.0 | |
50 | Requires: python3-keystoneauth1 >= 3.0.1 | |
51 | Requires: python3-oslo.config >= 4.0.0 | |
52 | Requires: python3-oslo.i18n >= 2.1.0 | |
53 | Requires: python3-oslo.serialization >= 1.10.0 | |
54 | Requires: python3-oslo.utils >= 3.20.0 | |
55 | Requires: python3-pbr >= 2.0.0 | |
56 | Requires: python3-positional >= 1.1.1 | |
57 | Requires: python3-requests >= 2.14.2 | |
58 | Requires: python3-six >= 1.9.0 | |
59 | Requires: python3-stevedore >= 1.20.0 | |
60 | ||
61 | %description -n python3-keystoneclient | |
62 | This is a client for the OpenStack Identity API, implemented by the | |
63 | Keystone team; it contains a Python API (the keystoneclient module) | |
64 | for OpenStack's Identity Service. | |
65 | ||
66 | %package apidocs | |
67 | Summary: API documentation for Python keystoneclient module | |
68 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona keystoneclient | |
69 | Group: Documentation | |
70 | ||
71 | %description apidocs | |
72 | API documentation for Pythona keystoneclient module. | |
73 | ||
74 | %description apidocs -l pl.UTF-8 | |
75 | Dokumentacja API modułu Pythona keystoneclient. | |
76 | ||
77 | %prep | |
78 | %setup -q | |
79 | ||
80 | %build | |
81 | %if %{with python2} | |
82 | %py_build %{?with_tests:test} | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %py3_build %{?with_tests:test} | |
87 | %endif | |
88 | ||
89 | %if %{with doc} | |
90 | cd doc | |
91 | %{__make} -j1 html | |
92 | rm -rf _build/html/_sources | |
93 | %endif | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %py_install | |
100 | ||
101 | %py_postclean | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc AUTHORS ChangeLog README.rst | |
115 | %{py_sitescriptdir}/keystoneclient | |
116 | %{py_sitescriptdir}/python_keystoneclient-%{version}-py*.egg-info | |
117 | %endif | |
118 | ||
119 | %if %{with python3} | |
120 | %files -n python3-keystoneclient | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS ChangeLog README.rst | |
123 | %{py3_sitescriptdir}/keystoneclient | |
124 | %{py3_sitescriptdir}/python_keystoneclient-%{version}-py*.egg-info | |
125 | %endif | |
126 | ||
127 | %if %{with doc} | |
128 | %files apidocs | |
129 | %defattr(644,root,root,755) | |
130 | %doc doc/_build/html/* | |
131 | %endif |