python-doc8/python-doc8.spec
2022-07-13 15:50:29 +08:00

107 lines
3.1 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-doc8
Version: 0.10.1
Release: 1
Summary: Style checker for Sphinx (or other) RST documentation
License: Apache-2.0
URL: https://github.com/pycqa/doc8
Source0: https://files.pythonhosted.org/packages/76/04/3f70faf4ad8d9bcc5f6a2ee27e4cad48fd3a1ed80f3ce40fc9334f268e2d/doc8-0.10.1.tar.gz
Source1: setup.py
BuildArch: noarch
%description
doc8 is an opinionated style checker for rst (with basic support for plain text)
styles of documentation.
%package -n python3-doc8
Summary: Style checker for Sphinx (or other) RST documentation
Provides: python-doc8
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# General requires
BuildRequires: python3-chardet
BuildRequires: python3-docutils
BuildRequires: python3-restructuredtext-lint
BuildRequires: python3-six
BuildRequires: python3-stevedore
BuildRequires: python3-pygments
# Test requires
BuildRequires: python3-testtools
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-restructuredtext-lint
# General requires
Requires: python3-testtools
Requires: python3-chardet
Requires: python3-docutils
Requires: python3-restructuredtext-lint
Requires: python3-six
Requires: python3-stevedore
Requires: python3-pygments
%description -n python3-doc8
doc8 is an opinionated style checker for rst (with basic support for plain text)
styles of documentation.
%package help
Summary: Style checker for Sphinx (or other) RST documentation
Provides: python3-doc8-doc
%description help
doc8 is an opinionated style checker for rst (with basic support for plain text)
styles of documentation.
%prep
%autosetup -n doc8-%{version}
cp %{SOURCE1} ./
%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
pytest
%files -n python3-doc8 -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Wed Jul 13 2022 huangtianhua <huangtianhua@huawei.com> - 0.10.1-1
- Upgrade to support Yoga
* Mon Jul 26 2021 OpenStack_SIG <openstack@openeuler.org> - 0.8.1-1
- Package Spec generate