[python-hardware] Initial import (#1192969).

Dmitry Tantsur divius at fedoraproject.org
Tue Feb 24 10:30:03 UTC 2015


commit 5452d3d222d0d43c9e33f1c71fef6bffde9cc408
Author: Dmitry Tantsur <dtantsur at redhat.com>
Date:   Tue Feb 24 11:29:44 2015 +0100

    Initial import (#1192969).

 .gitignore           |   1 +
 python-hardware.spec | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |   1 +
 3 files changed, 132 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c2a834a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/hardware-0.9.tar.gz
diff --git a/python-hardware.spec b/python-hardware.spec
new file mode 100644
index 0000000..a61fd8c
--- /dev/null
+++ b/python-hardware.spec
@@ -0,0 +1,130 @@
+%{?!_licensedir:%global license %%doc}
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+Name:           python-hardware
+Summary:        Hardware detection and classification utilities
+Version:        0.9
+Release:        1%{?dist}
+License:        ASL 2.0
+Group:          Development/Languages
+URL:            https://pypi.python.org/pypi/hardware
+
+Source0:        https://pypi.python.org/packages/source/h/hardware/hardware-%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRequires:  python-setuptools
+BuildRequires:  python2-devel
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-pbr
+%endif # if with_python3
+BuildRequires:  python-pbr
+BuildRequires:  python-sphinx
+BuildRequires:  python-oslo-sphinx
+Requires: python-babel
+Requires: python-ipaddr
+Requires: python-netaddr
+Requires: python-pexpect
+
+
+%prep
+%autosetup -v -p 1 -n hardware-%{version}
+rm -rf *.egg-info
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
+
+%build
+%{__python2} setup.py build
+%{__python2} setup.py build_sphinx
+rm -rf doc/build/html/.buildinfo
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+%endif # with_python3
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+
+
+%description
+Hardware detection and classification utilities.
+Features:
+* detect hardware features of a Linux systems:
+** RAID
+** hard drives
+** IPMI
+** network cards
+** DMI infos
+** memory settings
+** processor features
+* filter hardware according to hardware profiles
+
+%if 0%{?with_python3}
+%package -n python3-hardware
+Summary:        Hardware detection and classification utilities
+Group:          Development/Languages
+Requires: python3-babel
+Requires: python3-netaddr
+Requires: python3-pexpect
+
+%description -n python3-hardware
+Hardware detection and classification utilities.
+Features:
+* detect hardware features of a Linux systems:
+** RAID
+** hard drives
+** IPMI
+** network cards
+** DMI infos
+** memory settings
+** processor features
+* filter hardware according to hardware profiles
+%endif # with_python3
+
+%package doc
+Summary:    Documentation for Hardware detection and classification utilities
+Group:      Documentation
+
+%description doc
+Documentation for Hardware detection and classification utilities.
+
+
+%files
+%license LICENSE
+%doc README.rst
+%{python2_sitelib}/hardware*
+%exclude %{python2_sitelib}/hardware/test*
+%{_bindir}/hardware-detect
+
+%files doc
+%license LICENSE
+%doc doc/build/html
+
+%if 0%{?with_python3}
+%files -n python3-hardware
+%license LICENSE
+%doc README.rst
+%{python3_sitelib}/hardware*
+%exclude %{python3_sitelib}/hardware/test*
+%endif # with_python3
+
+%changelog
+
+* Fri Feb 13 2015 Dmitry Tantsur <dtantsur at redhat.com> - 0.9-1
+- Initial package build
+
diff --git a/sources b/sources
index e69de29..db610bb 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+917aadeacce5c7a85d9bb4acbd3cdf1a  hardware-0.9.tar.gz


More information about the scm-commits mailing list