From ec4cf50a4416a2a1311e81251c78496c4b544594 Mon Sep 17 00:00:00 2001 From: DengXiewei Date: Wed, 20 Jul 2022 16:06:05 +0800 Subject: [PATCH] Add doc sub package Signed-off-by: DengXiewei --- python-requests-ftp.spec | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/python-requests-ftp.spec b/python-requests-ftp.spec index ab5dd5b..ab53668 100644 --- a/python-requests-ftp.spec +++ b/python-requests-ftp.spec @@ -1,3 +1,5 @@ +%define anolis_release .0.1 + %global srcname requests-ftp # Disable python3 by default on RHEL < 7 @@ -16,7 +18,7 @@ Name: python-%{srcname} Version: 0.3.1 -Release: 11%{?dist} +Release: 11%{anolis_release}%{?dist} Summary: FTP transport adapter for python-requests License: ASL 2.0 @@ -56,6 +58,14 @@ Requests-FTP is an implementation of a very stupid FTP transport adapter for use with the awesome Requests Python library. This is the Python 2 version of the transport adapter module. + +%package -n python2-%{srcname}-doc +Summary: Documents for %{name} +Requires: python2-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch + +%description -n python2-%{srcname}-doc +Doc pages for %{name}. %endif %if %{with python3} @@ -73,6 +83,14 @@ Requests-FTP is an implementation of a very stupid FTP transport adapter for use with the awesome Requests Python library. This is the Python 3 version of the transport adapter module. + +%package -n python3-requests-ftp-doc +Summary: Documents for %{name} +Requires: python3-requests-ftp = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch + +%description -n python3-requests-ftp-doc +Doc pages for %{name}. %endif %prep @@ -99,21 +117,29 @@ rm -rf requests_ftp.egg-info %if %{with python2} %files -n python2-%{srcname} -%doc README.rst %license LICENSE %{python2_sitelib}/requests_ftp/ %{python2_sitelib}/requests_ftp*.egg-info* + +%files -n python2-%{srcname}-doc +%doc README.rst %endif %if %{with python3} %files -n python3-%{srcname} -%doc README.rst %license LICENSE %{python3_sitelib}/requests_ftp/ %{python3_sitelib}/requests_ftp*.egg-info* + +%files -n python3-%{srcname}-doc +%doc README.rst %endif + %changelog +* Wed Jul 20 2022 DengXiewei - 0.3.1-11.0.1 +- Add doc sub package + * Mon Aug 13 2018 David Shea - 0.3.1-11 - Fix handling of multi-line FTP responses Resolves: rhbz#1591065 -- Gitee