python-transaction/python-transaction.spec
zhangfan b90a68c1e1 Add spec and tar for openstack w
Signed-off-by: zhangfan <zh.f@outlook.com>
2021-08-06 10:38:39 +08:00

95 lines
2.7 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-transaction
Version: 3.0.1
Release: 1
Summary: Transaction management for Python
License: ZPL 2.1
URL: https://github.com/zopefoundation/transaction
Source0: https://files.pythonhosted.org/packages/28/d3/a09ac263b4eebfff68545e75a36cc570c63f7d41e0f84db99fd983a92e00/transaction-3.0.1.tar.gz
BuildArch: noarch
%description
Transaction management for Python
%package -n python3-transaction
Summary: Transaction management for Python
Provides: python-transaction
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# General requires
BuildRequires: python3-zope-interface
BuildRequires: python3-sphinx
BuildRequires: python3-repoze-sphinx-autointerface
# Tests running requires
BuildRequires: python3-mock
BuildRequires: python3-nose
BuildRequires: python3-coverage
BuildRequires: python3-mock
# General requires
Requires: python3-zope-interface
Requires: python3-sphinx
Requires: python3-repoze-sphinx-autointerface
# Tests running requires
Requires: python3-mock
Requires: python3-nose
Requires: python3-coverage
Requires: python3-mock
%description -n python3-transaction
Transaction management for Python
%package help
Summary: Transaction management for Python
Provides: python3-transaction-doc
%description help
Transaction management for Python
%prep
%autosetup -n transaction-%{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-transaction -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri Aug 06 2021 OpenStack_SIG <openstack@openeuler.org> - 3.0.1-1
- Package Spec generate