Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
cd86367455 !12 Modify Source0 Url of package python-hwdata
From: @wang--ge
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-09-18 15:04:47 +08:00
wangge
45dc6579f6 Modify Source0 Url 2020-09-17 20:04:28 +08:00
openeuler-ci-bot
b541faa2ac !2 Package init
Merge pull request !2 from huzunhao/master
2020-02-21 15:34:50 +08:00
fengtao
5a23bc377e init 2020-02-21 10:21:57 +08:00
fengtao
3b8af9dc8c init 2020-02-21 10:18:07 +08:00
fengtao
6e387966fd init 2020-02-20 20:56:28 +08:00
fengtao
3cbd5d7f83 init 2020-02-20 19:28:40 +08:00
fengtao
b185e66cc2 init 2020-02-20 19:25:49 +08:00
openeuler-ci-bot
b3073f3360 !1 package init
Merge pull request !1 from jackie_wu123/master
2019-12-23 17:21:04 +08:00
jackie_wu123
7ba995f1cb python-hwdata init 2019-12-23 16:57:58 +08:00
2 changed files with 88 additions and 0 deletions

Binary file not shown.

88
python-hwdata.spec Normal file
View File

@ -0,0 +1,88 @@
%bcond_without python2
Name: python-hwdata
Version: 2.3.7
Release: 6
Summary: Python bindings to hwdata package
License: GPLv2
URL: https://github.com/xsuchy/python-hwdata
Source0: https://github.com/xsuchy/python-hwdata/archive/%{name}-%{version}-1.tar.gz
BuildArch: noarch
%description
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: Python bindings to hwdata package
BuildRequires: python2-devel
Requires: hwdata
%{?python_provide:%python_provide python2-hwdata}
%description -n python2-hwdata
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: Python bindings to hwdata package
BuildRequires: python3-devel
Requires: hwdata
%{?python_provide:%python_provide python3-hwdata}
%description -n python3-hwdata
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}-%{name}-%{version}-1 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
%if %{with python2}
%_bindir/python2 setup.py build '--executable=%_bindir/python2 -s'
%endif # with python2
pushd %{py3dir}
%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s'
popd
%install
%if %{with python2}
%_bindir/python2 setup.py install -O1 --skip-build --root %buildroot
%endif
pushd %{py3dir}
%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot
popd
%check
%if %{with python2}
%files -n python2-hwdata
%defattr(-,root,root)
%license LICENSE
%_prefix/lib/python2.7/site-packages/*
%endif # with python2
%files -n python3-hwdata
%defattr(-,root,root)
%license LICENSE
%_prefix/lib/python3.7/site-packages/*
%files help
%defattr(-,root,root)
%doc example.py README.md html
%changelog
* Mon Sep 7 2020 Ge Wang<wangge20@huawei.com> - 2.3.7-6
- Modify Source0 Url
* Tue Feb 11 2020 huzunhao<huzunhao2@huawei.com> - 2.3.7-5
- Package init