Frederic Lepied 6f86d72
%{?!_licensedir:%global license %%doc}
Haikel Guemar d7af970
%{!?upstream_version: %global upstream_version %{version}}
Haikel Guemar d7af970
Dmitry Tantsur 5452d3d
%if 0%{?fedora}
Dmitry Tantsur 5452d3d
%global with_python3 1
Dmitry Tantsur 5452d3d
%endif
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
Name:           python-hardware
Dmitry Tantsur 5452d3d
Summary:        Hardware detection and classification utilities
Frederic Lepied 386c310
Version:        0.18
a35427a
Release:        12%{?dist}
Dmitry Tantsur 5452d3d
License:        ASL 2.0
Dmitry Tantsur 5452d3d
URL:            https://pypi.python.org/pypi/hardware
Dmitry Tantsur 5452d3d
8eb2202
Source0:        https://pypi.io/packages/source/h/hardware/hardware-%{upstream_version}.tar.gz
Haikel Guemar d7af970
Dmitry Tantsur 5452d3d
BuildArch:      noarch
24b0fe6
BuildRequires:  python2-setuptools
Dmitry Tantsur 5452d3d
BuildRequires:  python2-devel
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
BuildRequires:  python3-devel
Dmitry Tantsur 5452d3d
BuildRequires:  python3-pbr
8eb2202
BuildRequires:  python3-six
24b0fe6
BuildRequires:  python3-netaddr
Dmitry Tantsur 5452d3d
%endif # if with_python3
24b0fe6
BuildRequires:  python2-pbr
24b0fe6
BuildRequires:  python2-six
24b0fe6
BuildRequires:  python2-sphinx
24b0fe6
BuildRequires:  python2-oslo-sphinx
Haikel Guemar d7af970
BuildRequires:  git
Frederic Lepied 6f86d72
# unit tests
24b0fe6
BuildRequires:  python2-netaddr
24b0fe6
BuildRequires:  python2-nose
24b0fe6
BuildRequires:  python2-numpy
24b0fe6
BuildRequires:  python2-pexpect
24b0fe6
BuildRequires:  python2-pandas
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%prep
8eb2202
%autosetup -S git -n hardware-%{upstream_version}
8eb2202
rm -rf *.egg-info
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
rm -rf %{py3dir}
Dmitry Tantsur 5452d3d
cp -a . %{py3dir}
Dmitry Tantsur 5452d3d
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
Dmitry Tantsur 5452d3d
%endif # with_python3
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%build
Dmitry Tantsur 5452d3d
%{__python2} setup.py build
Dmitry Tantsur 5452d3d
%{__python2} setup.py build_sphinx
Dmitry Tantsur 5452d3d
rm -rf doc/build/html/.buildinfo
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
pushd %{py3dir}
Dmitry Tantsur 5452d3d
%{__python3} setup.py build
Dmitry Tantsur 5452d3d
%endif # with_python3
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%install
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
pushd %{py3dir}
Dmitry Tantsur 5452d3d
%{__python3} setup.py install --skip-build --root %{buildroot}
Dmitry Tantsur 5452d3d
popd
Dmitry Tantsur 5452d3d
%endif # with_python3
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
Dmitry Tantsur 5452d3d
Frederic Lepied 6f86d72
%check
24b0fe6
nosetests-2 hardware/tests
Dmitry Tantsur 5452d3d
43446f7
%global _description\
43446f7
Hardware detection and classification utilities.\
43446f7
Features:\
43446f7
* detect hardware features of a Linux systems:\
43446f7
** RAID\
43446f7
** hard drives\
43446f7
** IPMI\
43446f7
** network cards\
43446f7
** DMI info\
43446f7
** memory settings\
43446f7
** processor features\
Dmitry Tantsur 5452d3d
* filter hardware according to hardware profiles
Dmitry Tantsur 5452d3d
43446f7
%description %_description
43446f7
43446f7
%package -n python2-hardware
43446f7
Summary: %summary
24b0fe6
Requires: python2-numpy
24b0fe6
Requires: python2-hardware-detect = %{version}-%{release}
24b0fe6
Requires: python2-babel
24b0fe6
Requires: python2-pandas
24b0fe6
Requires: python2-pbr
24b0fe6
Requires: python2-six
43446f7
%{?python_provide:%python_provide python2-hardware}
43446f7
43446f7
%description -n python2-hardware %_description
43446f7
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
%package -n python3-hardware
Dmitry Tantsur 5452d3d
Summary:        Hardware detection and classification utilities
Dmitry Tantsur 5452d3d
Group:          Development/Languages
8eb2202
Requires: python3-numpy
Thierry Vignaud a4d4405
Requires: python3-pbr
Dmitry Tantsur 5452d3d
Requires: python3-babel
Dmitry Tantsur 5452d3d
Requires: python3-netaddr
Dmitry Tantsur 5452d3d
Requires: python3-pexpect
8eb2202
Requires: python3-six
24b0fe6
%{?python_provide:%python_provide python3-hardware}
Dmitry Tantsur 5452d3d
24b0fe6
%description -n python3-hardware %_description
Dmitry Tantsur 5452d3d
%endif # with_python3
Dmitry Tantsur 5452d3d
24b0fe6
%package -n python2-hardware-detect
Frederic Lepied e0ed822
Summary:    Hardware detection and classification utilities
Frederic Lepied e0ed822
Requires: lshw
Frederic Lepied e0ed822
Requires: smartmontools
Frederic Lepied e0ed822
Requires: lldpad
Frederic Lepied e0ed822
Requires: sdparm
Frederic Lepied e0ed822
Requires: sysbench
Frederic Lepied e0ed822
Requires: fio
24b0fe6
Requires: python2-pbr
24b0fe6
Requires: python2-ipaddr
24b0fe6
Requires: python2-netaddr
Frederic Lepied e0ed822
%if 0%{?fedora}
24b0fe6
Requires: python2-pexpect
Frederic Lepied e0ed822
%else
Frederic Lepied e0ed822
Requires: pexpect
Frederic Lepied e0ed822
%endif
24b0fe6
Requires: python2-ptyprocess
Frederic Lepied e0ed822
Requires: ethtool
Frederic Lepied e0ed822
Requires: pciutils
24b0fe6
%{?python_provide:%python_provide python2-hardware-detect}
Frederic Lepied e0ed822
24b0fe6
%description -n python2-hardware-detect
Frederic Lepied e0ed822
Hardware detection and classification utilities.
Frederic Lepied e0ed822
Frederic Lepied e0ed822
Dmitry Tantsur 5452d3d
%package doc
Dmitry Tantsur 5452d3d
Summary:    Documentation for Hardware detection and classification utilities
Dmitry Tantsur 5452d3d
Group:      Documentation
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%description doc
Dmitry Tantsur 5452d3d
Documentation for Hardware detection and classification utilities.
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
43446f7
%files -n python2-hardware
Dmitry Tantsur 5452d3d
%license LICENSE
Dmitry Tantsur 5452d3d
%doc README.rst
Frederic Lepied e0ed822
%{python2_sitelib}/hardware/cardiff
Frederic Lepied cf4c8e6
%{_bindir}/hardware-cardiff
8eb2202
%{python2_sitelib}/hardware/test*
Frederic Lepied e0ed822
24b0fe6
%files -n python2-hardware-detect
Frederic Lepied e0ed822
%license LICENSE
Frederic Lepied e0ed822
%doc README.rst
Dmitry Tantsur 5452d3d
%{_bindir}/hardware-detect
Frederic Lepied e0ed822
%{python2_sitelib}/hardware/benchmark
Frederic Lepied e0ed822
%{python2_sitelib}/hardware/*.py*
Frederic Lepied e0ed822
%{python2_sitelib}/hardware*.egg-info
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%files doc
Dmitry Tantsur 5452d3d
%license LICENSE
Dmitry Tantsur 5452d3d
%doc doc/build/html
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%if 0%{?with_python3}
Dmitry Tantsur 5452d3d
%files -n python3-hardware
Dmitry Tantsur 5452d3d
%license LICENSE
Dmitry Tantsur 5452d3d
%doc README.rst
Dmitry Tantsur 5452d3d
%{python3_sitelib}/hardware*
8eb2202
%exclude %{python3_sitelib}/hardware/test*
Dmitry Tantsur 5452d3d
%endif # with_python3
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
%changelog
a35427a
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.18-12
a35427a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a35427a
df836c1
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.18-11
df836c1
- Rebuilt for Python 3.7
df836c1
24b0fe6
* Tue Mar 20 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.18-10
24b0fe6
- Also rename python-hardware-detect to python2-hardware-detect
24b0fe6
- Add missing %%python_provide calls
24b0fe6
- Use new python2-* names for dependencies
24b0fe6
f0ef916
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.18-9
f0ef916
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f0ef916
Frederic Lepied 6f86d72
* Wed Aug 30 2017 Frederic Lepied <frederic.lepied@redhat.com> - 0.18-8
Frederic Lepied 6f86d72
- run unit tests at build time
Frederic Lepied 6f86d72
43446f7
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.18-7
43446f7
- Python 2 binary package renamed to python2-hardware
43446f7
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
43446f7
56c6d35
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.18-6
56c6d35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
56c6d35
8eb2202
* Tue Jun 13 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.18-5
8eb2202
- Refresh spec file
8eb2202
d979a37
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.18-4
d979a37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d979a37
115c1d0
* Thu Dec 22 2016 Miro Hrončok <mhroncok@redhat.com> - 0.18-3
115c1d0
- Rebuild for Python 3.6
115c1d0
7c4e776
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18-2
7c4e776
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7c4e776
Frederic Lepied 386c310
* Tue Jul  5 2016 Frederic Lepied <frederic.lepied@redhat.com> 0.18-1
Frederic Lepied 386c310
- new version (bug #1196176)
Frederic Lepied 386c310
- add missing deps on python(3)-pbr (rhbz#1346054, Thierry Vignaud)
Frederic Lepied 386c310
Frederic Lepied e0ed822
* Thu Feb 11 2016 Frederic Lepied <frederic.lepied@redhat.com> 0.17-6
Frederic Lepied e0ed822
- split the detect part in a standalone package python-hardware-detect
Frederic Lepied e0ed822
- fix the missing requires: ethtool and pcitutils
Frederic Lepied e0ed822
Frederic Lepied e0ed822
* Wed Feb 10 2016 Frederic Lepied <frederic.lepied@redhat.com> 0.17-5
Frederic Lepied 7190d2d
- exclude examples
Frederic Lepied 7190d2d
3b6c66a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.17-4
3b6c66a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3b6c66a
067e673
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-3
067e673
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
067e673
Frederic Lepied 7e6e9b8
* Wed Oct 14 2015 Frederic Lepied <frederic.lepied@redhat.com> 0.17-2
Frederic Lepied 7e6e9b8
- add missing requires: lshw, smartmontools, lldpad, sdparm (Erwan)
Frederic Lepied 7e6e9b8
- add missing requires: fio (taken from Delorean)
Frederic Lepied 7e6e9b8
Frederic Lepied eded92d
* Wed Sep 23 2015 Frederic Lepied <frederic.lepied@redhat.com> 0.17-1
Frederic Lepied eded92d
- new version (bug #1196176)
Frederic Lepied eded92d
Frederic Lepied 085c611
* Sat Aug  8 2015 Frederic Lepied <frederic.lepied@redhat.com> 0.16-1
Frederic Lepied 085c611
- new version (bug #1196176)
Frederic Lepied 085c611
3c2205c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-2
3c2205c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3c2205c
Frederic Lepied acbe21e
* Mon May 11 2015 Frederic Lepied <frederic.lepied@redhat.com> - 0.15-1
Frederic Lepied acbe21e
- new version (bug #1196176)
Frederic Lepied acbe21e
Haikel Guemar d7af970
* Tue May 05 2015 Haïkel Guémar <hguemar@fedoraproject> - 0.14-2
Haikel Guemar d7af970
- Fix requirements
Haikel Guemar d7af970
- Add a patch to improve output of cardiff from John Trowbridge
Haikel Guemar d7af970
Frederic Lepied fd493ff
* Tue Mar 31 2015 Frederic Lepied <frederic.lepied@redhat.com> - 0.14-1
Frederic Lepied fd493ff
- new version (bug #1196176)
Frederic Lepied fd493ff
Frederic Lepied 44e9cce
* Thu Mar 26 2015 Frederic Lepied <frederic.lepied@redhat.com> - 0.13-1
Frederic Lepied 44e9cce
- new version (bug #1196176)
Frederic Lepied 44e9cce
Frederic Lepied 44525e3
* Wed Mar 18 2015 Frederic Lepied <frederic.lepied@redhat.com> - 0.12-1
Frederic Lepied 44525e3
- new version (bug #1196176)
Frederic Lepied 44525e3
Dmitry Tantsur 90bc053
* Tue Feb 24 2015 Dmitry Tantsur <divius.inside@gmail.com> - 0.11-1
Dmitry Tantsur 90bc053
- new version (bug #1195701)
Dmitry Tantsur 5452d3d
Dmitry Tantsur 5452d3d
* Fri Feb 13 2015 Dmitry Tantsur <dtantsur@redhat.com> - 0.9-1
Dmitry Tantsur 5452d3d
- Initial package build
Dmitry Tantsur 5452d3d