2020-02-20 19:25:49 +08:00
|
|
|
%bcond_without python2
|
|
|
|
|
|
|
|
|
|
Name: python-hwdata
|
|
|
|
|
Version: 2.3.7
|
2020-06-18 16:36:45 +08:00
|
|
|
Release: 6
|
2020-02-20 19:25:49 +08:00
|
|
|
Summary: Python bindings to hwdata package
|
|
|
|
|
License: GPLv2
|
|
|
|
|
URL: https://github.com/xsuchy/python-hwdata
|
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%description
|
2020-02-20 19:25:49 +08:00
|
|
|
Provide python interface to database stored in hwdata package.
|
|
|
|
|
It allows you to get human readable description of USB and PCI devices.
|
2019-12-23 16:57:58 +08:00
|
|
|
|
2020-02-20 19:25:49 +08:00
|
|
|
%if %{with python2}
|
2019-12-23 16:57:58 +08:00
|
|
|
%package -n python2-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
Summary: Python bindings to hwdata package
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
Requires: hwdata
|
2019-12-23 16:57:58 +08:00
|
|
|
%{?python_provide:%python_provide python2-hwdata}
|
|
|
|
|
|
|
|
|
|
%description -n python2-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
Provide python interface to database stored in hwdata package.
|
|
|
|
|
It allows you to get human readable description of USB and PCI devices.
|
|
|
|
|
%endif
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%package -n python3-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
Summary: Python bindings to hwdata package
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
Requires: hwdata
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-hwdata}
|
|
|
|
|
|
|
|
|
|
%description -n python3-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
Provide python interface to database stored in hwdata package.
|
|
|
|
|
It allows you to get human readable description of USB and PCI devices.
|
2019-12-23 16:57:58 +08:00
|
|
|
|
2020-02-20 19:25:49 +08:00
|
|
|
%package_help
|
2019-12-23 16:57:58 +08:00
|
|
|
%prep
|
2020-02-21 10:21:57 +08:00
|
|
|
%autosetup -n %{name}-%{version} -p1
|
2019-12-23 16:57:58 +08:00
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
|
|
|
|
|
%build
|
2020-02-20 19:25:49 +08:00
|
|
|
%if %{with python2}
|
|
|
|
|
%_bindir/python2 setup.py build '--executable=%_bindir/python2 -s'
|
|
|
|
|
%endif # with python2
|
2019-12-23 16:57:58 +08:00
|
|
|
|
2020-02-20 19:25:49 +08:00
|
|
|
pushd %{py3dir}
|
|
|
|
|
%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s'
|
|
|
|
|
popd
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%install
|
2020-02-20 19:25:49 +08:00
|
|
|
%if %{with python2}
|
|
|
|
|
%_bindir/python2 setup.py install -O1 --skip-build --root %buildroot
|
|
|
|
|
%endif
|
2019-12-23 16:57:58 +08:00
|
|
|
|
2020-02-20 19:25:49 +08:00
|
|
|
pushd %{py3dir}
|
|
|
|
|
%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot
|
|
|
|
|
popd
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
|
2020-02-20 19:25:49 +08:00
|
|
|
%if %{with python2}
|
2019-12-23 16:57:58 +08:00
|
|
|
%files -n python2-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
%defattr(-,root,root)
|
2019-12-23 16:57:58 +08:00
|
|
|
%license LICENSE
|
2020-06-18 16:36:45 +08:00
|
|
|
%{python2_sitelib}/*
|
2020-02-20 19:25:49 +08:00
|
|
|
%endif # with python2
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%files -n python3-hwdata
|
2020-02-20 19:25:49 +08:00
|
|
|
%defattr(-,root,root)
|
2019-12-23 16:57:58 +08:00
|
|
|
%license LICENSE
|
2020-06-18 16:36:45 +08:00
|
|
|
%{python3_sitelib}/*
|
2020-02-20 19:25:49 +08:00
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc example.py README.md html
|
2019-12-23 16:57:58 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2020-06-18 16:36:45 +08:00
|
|
|
* Fri Jun 19 2020 fuyangqing<fuyangqing@huawei.com> - 2.3.7-6
|
|
|
|
|
-Type:bugfix
|
|
|
|
|
-ID:NA
|
|
|
|
|
-SUG:NA
|
|
|
|
|
-DESC:change sepc hardcode the dependent python version number
|
|
|
|
|
|
2020-02-20 20:56:28 +08:00
|
|
|
* Tue Feb 11 2020 huzunhao<huzunhao2@huawei.com> - 2.3.7-5
|
2019-12-23 16:57:58 +08:00
|
|
|
- Package init
|