-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-osc-lib.spec
More file actions
213 lines (167 loc) · 5.66 KB
/
python-osc-lib.spec
File metadata and controls
213 lines (167 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
# Python3 support in OpenStack starts with version 3.5,
# which is only in Fedora 24+
%if 0%{?fedora} >= 24
%global with_python3 1
%endif
%global library osc-lib
%global module osc_lib
Name: python-%{library}
Version: 1.1.0
Release: 2%{?dist}
Summary: OpenStack library for writing OSC plugins
License: ASL 2.0
URL: https://github.com/openstack/%{library}/
Source0: http://tarballs.openstack.org/%{library}/%{library}-%{upstream_version}.tar.gz
BuildArch: noarch
%package -n python2-%{library}
Summary: OpenStack library for writing OSC plugins
%{?python_provide:%python_provide python2-%{library}}
BuildRequires: python2-devel
BuildRequires: python-pbr
BuildRequires: python-setuptools
BuildRequires: git
BuildRequires: python-testrepository
BuildRequires: python-oslo-i18n
BuildRequires: python-keystoneauth1
BuildRequires: python-cliff
BuildRequires: python-mock
BuildRequires: python-coverage
BuildRequires: python-oslo-sphinx
BuildRequires: python-oslotest
BuildRequires: python-reno
BuildRequires: python-requests-mock
BuildRequires: python-os-testr
BuildRequires: python-testtools
BuildRequires: python-osprofiler
BuildRequires: python-oslo-utils
BuildRequires: python-os-client-config
BuildRequires: python-requests
BuildRequires: python-simplejson
BuildRequires: python-stevedore
Requires: python-oslo-config >= 2:3.4.0
Requires: python-six >= 1.9.0
Requires: python-pbr >= 1.6
Requires: python-cliff >= 1.15.0
Requires: python-keystoneauth1 >= 2.10.0
Requires: python-os-client-config >= 1.13.1
Requires: python-oslo-i18n >= 2.1.0
Requires: python-oslo-utils >= 3.16.0
Requires: python-requests >= 2.10.0
Requires: python-simplejson >= 2.2.0
Requires: python-stevedore >= 1.16.0
%description -n python2-%{library}
osc-lib is a package of common support modules for writing OSC plugins.
%package -n python2-%{library}-tests
Summary: OpenStack osc-lib library tests
Requires: python2-%{library} = %{version}-%{release}
%description -n python2-%{library}-tests
osc-lib is a package of common support modules for writing OSC plugins.
This package contains the osc-lib library test files.
%package -n python-%{library}-doc
Summary: OpenStack osc-lib library documentation
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
%description -n python-%{library}-doc
osc-lib is a package of common support modules for writing OSC plugins.
This package contains the documentation.
%if 0%{?with_python3}
%package -n python3-%{library}
Summary: OpenStack Example library
%{?python_provide:%python_provide python3-%{library}}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
BuildRequires: git
BuildRequires: python3-testrepository
BuildRequires: python3-oslo-i18n
BuildRequires: python3-keystoneauth1
BuildRequires: python3-cliff
BuildRequires: python3-mock
BuildRequires: python3-coverage
BuildRequires: python3-oslo-sphinx
BuildRequires: python3-oslotest
BuildRequires: python3-reno
BuildRequires: python3-requests-mock
BuildRequires: python3-os-testr
BuildRequires: python3-testtools
BuildRequires: python3-oslo-utils
BuildRequires: python3-os-client-config
BuildRequires: python3-requests
BuildRequires: python3-simplejson
BuildRequires: python3-stevedore
Requires: python3-oslo-config >= 2:3.4.0
Requires: python3-six >= 1.9.0
Requires: python3-pbr >= 1.6
Requires: python3-cliff >= 1.15.0
Requires: python3-keystoneauth1 >= 2.10.0
Requires: python3-os-client-config >= 1.13.1
Requires: python3-oslo-i18n >= 2.1.0
Requires: python3-oslo-utils >= 3.16.0
Requires: python3-requests >= 2.10.0
Requires: python3-simplejson >= 2.2.0
Requires: python3-stevedore >= 1.16.0
%description -n python3-%{library}
osc-lib is a package of common support modules for writing OSC plugins.
%package -n python3-%{library}-tests
Summary: OpenStack osc-lib library tests
Requires: python3-%{library} = %{version}-%{release}
%description -n python3-%{library}-tests
osc-lib is a package of common support modules for writing OSC plugins.
This package contains the osc-lib library test files.
%endif # with_python3
%description
osc-lib is a package of common support modules for writing OSC plugins.
%prep
%autosetup -n %{library}-%{upstream_version} -S git
# Let's handle dependencies ourseleves
rm -f *requirements.txt
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
# generate html docs
sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
%check
%if 0%{?with_python3}
%{__python3} setup.py test
rm -rf .testrepository
%endif
%{__python2} setup.py test
%files -n python2-%{library}
%license LICENSE
%{python2_sitelib}/%{module}
%{python2_sitelib}/%{module}-*.egg-info
%exclude %{python2_sitelib}/%{module}/tests
%files -n python2-%{library}-tests
%license LICENSE
%{python2_sitelib}/%{module}/tests
%files -n python-%{library}-doc
%license LICENSE
%doc html README.rst
%if 0%{?with_python3}
%files -n python3-%{library}
%license LICENSE
%{python3_sitelib}/%{module}
%{python3_sitelib}/%{module}-*.egg-info
%exclude %{python3_sitelib}/%{module}/tests
%files -n python3-%{library}-tests
%license LICENSE
%{python3_sitelib}/%{module}/tests
%endif # with_python3
%changelog
* Mon Sep 12 2016 Alfredo Moralejo <amoralej@redhat.com> - 1.1.0-2
- Added upstream_version reference and fallback macro.
* Mon Sep 12 2016 Alfredo Moralejo <amoralej@redhat.com> - 1.1.0-1
- Update to version 1.1.0
- Update requirements
* Tue Jun 14 2016 Alfredo Moralejo <amoralej@redhat.com> - 0.1.0-1
- initial package