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