diff --git a/python-hwdata-2.3.7.tar.gz b/python-hwdata-2.3.7.tar.gz index f0f5d8a..89782aa 100644 Binary files a/python-hwdata-2.3.7.tar.gz and b/python-hwdata-2.3.7.tar.gz differ diff --git a/python-hwdata.spec b/python-hwdata.spec index fab54c2..15da8d7 100644 --- a/python-hwdata.spec +++ b/python-hwdata.spec @@ -1,70 +1,85 @@ -Name: python-hwdata -Version: 2.3.7 -Release: 4 -Summary: Binding python to hwdata package -BuildArch: noarch -License: GPLv2 -URL: https://github.com/xsuchy/python-hwdata -Source0: %{name}-%{version}.tar.gz +%bcond_without python2 + +Name: python-hwdata +Version: 2.3.7 +Release: 5 +Summary: Python bindings to hwdata package +License: GPLv2 +URL: https://github.com/xsuchy/python-hwdata +Source0: %{name}-%{version}.tar.gz + +BuildArch: noarch %description -Supply python interface for stored database in hwdata package. -This can make you get human readable description about PCI devices and USB. +Provide python interface to database stored in hwdata package. +It allows you to get human readable description of USB and PCI devices. +%if %{with python2} %package -n python2-hwdata -Summary: Binding python to hwdata package -BuildRequires: python2-devel -Requires: hwdata - +Summary: Python bindings to hwdata package +BuildRequires: python2-devel +Requires: hwdata %{?python_provide:%python_provide python2-hwdata} %description -n python2-hwdata -Supply python interface for stored database in hwdata package. -This can make you get human readable description about PCI devices and USB. -This is the Python 2 build of the module. +Provide python interface to database stored in hwdata package. +It allows you to get human readable description of USB and PCI devices. +%endif %package -n python3-hwdata -Summary: Binding python to hwdata package -BuildRequires: python3-devel python3-pylint -Requires: hwdata +Summary: Python bindings to hwdata package + +BuildRequires: python3-devel +Requires: hwdata %{?python_provide:%python_provide python3-hwdata} %description -n python3-hwdata -Supply python interface for stored database in hwdata package. -This can make you get human readable description about PCI devices and USB. -This is the Python 3 build of the module. +Provide python interface to database stored in hwdata package. +It allows you to get human readable description of USB and PCI devices. +%package_help %prep %autosetup -n %{name}-%{version} -p1 rm -rf %{py3dir} cp -a . %{py3dir} %build -%py2_build +%if %{with python2} +%_bindir/python2 setup.py build '--executable=%_bindir/python2 -s' +%endif # with python2 -cd %{py3dir} -%py3_build +pushd %{py3dir} +%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s' +popd %install -%py2_install +%if %{with python2} +%_bindir/python2 setup.py install -O1 --skip-build --root %buildroot +%endif -cd %{py3dir} -%py3_install +pushd %{py3dir} +%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot +popd %check -pylint-3 hwdata.py example.py || : +%if %{with python2} %files -n python2-hwdata +%defattr(-,root,root) %license LICENSE -%doc README.md example.py html -%{python2_sitelib}/* +%_prefix/lib/python2.7/site-packages/* +%endif # with python2 %files -n python3-hwdata +%defattr(-,root,root) %license LICENSE -%doc README.md example.py html -%{python3_sitelib}/* +%_prefix/lib/python3.7/site-packages/* + +%files help +%defattr(-,root,root) +%doc example.py README.md html %changelog -* Fri Dec 20 2019 wutao - 2.3.7-4 +* Tue Feb 11 2020 huzunhao - 2.3.7-5 - Package init