-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-sushy.spec
140 lines (103 loc) · 3.43 KB
/
python-sushy.spec
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
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global sname sushy
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-%{sname}
Version: 1.2.0
Release: 1%{dist}
Summary: Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
License: ASL 2.0
URL: http://launchpad.net/%{sname}/
Source0: http://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
BuildArch: noarch
%description
Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
%package -n python2-%{sname}
Summary: Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
%{?python_provide:%python_provide python2-%{sname}}
BuildRequires: python2-devel
BuildRequires: python2-pbr
BuildRequires: python-setuptools
Requires: python2-pbr >= 2.0.0
Requires: python-six >= 1.9.0
Requires: python-requests
%description -n python2-%{sname}
Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
%package -n python2-%{sname}-tests
Summary: Sushy tests
Requires: python2-%{sname} = %{version}-%{release}
%description -n python2-%{sname}-tests
Tests for Sushy
%if 0%{?with_python3}
%package -n python3-%{sname}
Summary: Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
%{?python_provide:%python_provide python3-%{sname}}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
Requires: python3-pbr >= 2.0.0
Requires: python3-six >= 1.9.0
Requires: python3-requests
%description -n python3-%{sname}
Sushy is a Python library to communicate with Redfish based systems (http://redfish.dmtf.org)
%package -n python3-%{sname}-tests
Summary: Sushy tests
Requires: python3-%{sname} = %{version}-%{release}
%description -n python3-%{sname}-tests
Tests for Sushy
%endif # with_python3
%package -n python-%{sname}-doc
Summary: Sushy documentation
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
%description -n python-%{sname}-doc
Documentation for Sushy
%prep
%autosetup -n %{sname}-%{upstream_version} -S git
# Let's handle dependencies ourseleves
rm -f *requirements.txt
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif # with_python3
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif # with_python3
# Setup directories
install -d -m 755 %{buildroot}%{_datadir}/%{sname}
install -d -m 755 %{buildroot}%{_sharedstatedir}/%{sname}
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{sname}
%files -n python2-%{sname}
%license LICENSE
%{python2_sitelib}/%{sname}
%{python2_sitelib}/%{sname}-*.egg-info
%exclude %{python2_sitelib}/%{sname}/tests
%files -n python2-%{sname}-tests
%license LICENSE
%{python2_sitelib}/%{sname}/tests
%if 0%{?with_python3}
%files -n python3-%{sname}
%license LICENSE
%{python3_sitelib}/%{sname}
%{python3_sitelib}/%{sname}-*.egg-info
%exclude %{python3_sitelib}/%{sname}/tests
%files -n python3-%{sname}-tests
%license LICENSE
%{python3_sitelib}/%{sname}/tests
%endif # with_python3
%files -n python-%{sname}-doc
%license LICENSE
%doc doc/build/html README.rst
%changelog
* Thu Dec 14 2017 Nathaniel Potter <nathaniel.potter@intel.com> 1.2.0-1
- Update for fedora packaging.
* Mon Mar 20 2017 Lucas Alvares Gomes <lucasagomes@gmail.com> 0.1.0-1
- Initial package.