]>
Commit | Line | Data |
---|---|---|
c4d91546 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # build doc (deps missing) | |
4 | %bcond_with tests # do perform "make test" (deps missing) | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: OpenStack Client Configuation Library | |
9 | Name: python-os-client-config | |
10 | Version: 1.28.0 | |
f9b6021b | 11 | Release: 4 |
c4d91546 JK |
12 | License: Apache |
13 | Group: Libraries/Python | |
14 | Source0: https://files.pythonhosted.org/packages/source/o/os-client-config/os-client-config-%{version}.tar.gz | |
742fca8b | 15 | # Source0-md5: cf0bffcf349932c306fd1d81459b1a9e |
c4d91546 JK |
16 | URL: https://pypi.python.org/pypi/os-client-config |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
19 | %if %{with python2} | |
20 | BuildRequires: python-pbr | |
21 | BuildRequires: python-setuptools | |
22 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-pbr | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
27 | Requires: python-PyYAML >= 3.1.0 | |
28 | Requires: python-appdirs >= 1.3.0 | |
29 | Requires: python-keystoneauth1 >= 2.1.0 | |
30 | Requires: python-requestsexceptions >= 1.1.1 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | os-client-config is a library for collecting client configuration for | |
36 | using an OpenStack cloud in a consistent and comprehensive manner. It | |
37 | will find cloud config for as few as 1 cloud and as many as you want | |
38 | to put in a config file. It will read environment variables and config | |
39 | files, and it also contains some vendor specific default values so | |
40 | that you don't have to know extra info to use OpenStack | |
41 | ||
42 | - If you have a config file, you will get the clouds listed in it | |
43 | - If you have environment variables, you will get a cloud named | |
44 | envvars | |
45 | - If you have neither, you will get a cloud named defaults with base | |
46 | defaults | |
47 | ||
48 | %package -n python3-os-client-config | |
49 | Summary: OpenStack Client Configuation Library | |
50 | Group: Libraries/Python | |
51 | Requires: python3-PyYAML >= 3.1.0 | |
52 | Requires: python3-appdirs >= 1.3.0 | |
53 | Requires: python3-keystoneauth1 >= 2.1.0 | |
54 | Requires: python3-requestsexceptions >= 1.1.1 | |
55 | ||
56 | %description -n python3-os-client-config | |
57 | os-client-config is a library for collecting client configuration for | |
58 | using an OpenStack cloud in a consistent and comprehensive manner. It | |
59 | will find cloud config for as few as 1 cloud and as many as you want | |
60 | to put in a config file. It will read environment variables and config | |
61 | files, and it also contains some vendor specific default values so | |
62 | that you don't have to know extra info to use OpenStack | |
63 | ||
64 | - If you have a config file, you will get the clouds listed in it | |
65 | - If you have environment variables, you will get a cloud named | |
66 | envvars | |
67 | - If you have neither, you will get a cloud named defaults with base | |
68 | defaults | |
69 | ||
70 | %package apidocs | |
71 | Summary: API documentation for Python os-client-config module | |
72 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona os-client-config | |
73 | Group: Documentation | |
74 | ||
75 | %description apidocs | |
76 | API documentation for Pythona os-client-config module. | |
77 | ||
78 | %description apidocs -l pl.UTF-8 | |
79 | Dokumentacja API modułu Pythona os-client-config. | |
80 | ||
81 | %prep | |
82 | %setup -q -n os-client-config-%{version} | |
83 | ||
84 | %build | |
85 | %if %{with python2} | |
86 | %py_build %{?with_tests:test} | |
87 | %endif | |
88 | ||
89 | %if %{with python3} | |
90 | %py3_build %{?with_tests:test} | |
91 | %endif | |
92 | ||
93 | %if %{with doc} | |
94 | cd doc | |
95 | %{__make} -j1 html | |
96 | rm -rf _build/html/_sources | |
97 | %endif | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with python2} | |
103 | %py_install | |
104 | ||
105 | %py_postclean | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %py3_install | |
110 | %endif | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %if %{with python2} | |
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc AUTHORS ChangeLog README.rst | |
119 | %{py_sitescriptdir}/os_client_config | |
120 | %{py_sitescriptdir}/os_client_config-%{version}-py*.egg-info | |
121 | %endif | |
122 | ||
123 | %if %{with python3} | |
124 | %files -n python3-os-client-config | |
125 | %defattr(644,root,root,755) | |
126 | %doc AUTHORS ChangeLog README.rst | |
127 | %{py3_sitescriptdir}/os_client_config | |
128 | %{py3_sitescriptdir}/os_client_config-%{version}-py*.egg-info | |
129 | %endif | |
130 | ||
131 | %if %{with doc} | |
132 | %files apidocs | |
133 | %defattr(644,root,root,755) | |
134 | %doc doc/_build/html/* | |
135 | %endif |