Add spec and tar for openstack w

Signed-off-by: zhangfan <zh.f@outlook.com>
This commit is contained in:
zhangfan 2021-08-06 10:33:42 +08:00
parent b8833023d3
commit 0a63bbff33
2 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,85 @@
%global _empty_manifest_terminate_build 0
Name: python-storage-interfaces
Version: 1.0.4
Release: 1
Summary: Abstract classes for representing storage-related objects
License: BSD
URL: https://github.com/Infinidat/storage_interfaces
Source0: https://files.pythonhosted.org/packages/b1/35/e944f2465282afcfd3d715ce013276b70435b61eedbc44347158f021dda7/storage_interfaces-1.0.4.tar.gz
BuildArch: noarch
%description
Abstract classes for representing storage-related objects
%package -n python3-storage-interfaces
Summary: Abstract classes for representing storage-related objects
Provides: python-storage-interfaces
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# Tests running requires
BuildRequires: python3-astroid
BuildRequires: python3-pylint
BuildRequires: python3-pytest
# Tests running requires
Requires: python3-astroid
Requires: python3-pylint
Requires: python3-pytest
%description -n python3-storage-interfaces
Abstract classes for representing storage-related objects
%package help
Summary: Abstract classes for representing storage-related objects
Provides: python3-storage-interfaces-doc
%description help
Abstract classes for representing storage-related objects
%prep
%autosetup -n storage_interfaces-%{version}
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
%{__python3} setup.py test
%files -n python3-storage-interfaces -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri Aug 06 2021 OpenStack_SIG <openstack@openeuler.org> - 1.0.4-1
- Package Spec generate

Binary file not shown.