python-doc8/python-doc8.spec

104 lines
3.0 KiB
RPMSpec
Raw Normal View History

%global _empty_manifest_terminate_build 0
Name: python-doc8
Version: 0.8.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/95/1a/fe1172cbad4c11923fcacc0dea2dfb23471e6f8daee7ddb0d73a8b85d7b1/doc8-0.8.1.tar.gz
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-nose
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-restructuredtext-lint
# General requires
Requires: python3-nose
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-0.8.1
%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
* Mon Jul 26 2021 OpenStack_SIG <openstack@openeuler.org> - 0.8.1-1
- Package Spec generate