From c0c9e1fbda2cebc3b42685566cadd4717d832f8a Mon Sep 17 00:00:00 2001 From: DengXiewei Date: Wed, 20 Jul 2022 16:00:27 +0800 Subject: [PATCH] Add doc sub package Signed-off-by: DengXiewei --- python-requests-file.spec | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/python-requests-file.spec b/python-requests-file.spec index ace15cb..f137662 100644 --- a/python-requests-file.spec +++ b/python-requests-file.spec @@ -1,3 +1,5 @@ +%define anolis_release .0.1 + %global srcname requests-file %if 0%{?rhel} && 0%{?rhel} <= 7 @@ -15,7 +17,7 @@ Name: python-%{srcname} Version: 1.4.3 -Release: 5%{?dist} +Release: 5%{anolis_release}%{?dist} Summary: Transport adapter for using file:// URLs with python-requests License: ASL 2.0 @@ -59,6 +61,14 @@ Requests-File is a transport adapter for use with the Requests Python library to allow local file system access via file:// URLs. This is the Python 2 version of the requests_file module + +%package -n python2-%{srcname}-doc +Summary: Documents for %{name} +Requires: python2-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch + +%description python2-%{srcname}-doc +Doc pages for %{name}. %endif %if %{with python3} @@ -79,6 +89,15 @@ Requests-File is a transport adapter for use with the Requests Python library to allow local file system access via file:// URLs. This is the Python 3 version of the requests_file module + + +%package -n python3-requests-file-doc +Summary: Documents for %{name} +Requires: python3-requests-file = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch + +%description python3-requests-file-doc +Doc pages for %{name}. %endif %prep @@ -112,21 +131,29 @@ rm -rf requests_file.egg-info %if %{with python2} %files -n python2-%{srcname} %license LICENSE -%doc README.rst %{python2_sitelib}/requests_file.py* %{python2_sitelib}/requests_file*.egg-info* + +%files -n python2-%{srcname}-doc +%doc README.rst %endif %if %{with python3} %files -n python3-requests-file %license LICENSE -%doc README.rst %{python3_sitelib}/requests_file.py* %{python3_sitelib}/__pycache__/requests_file.* %{python3_sitelib}/requests_file*.egg-info* + +%files -n python3-requests-file-doc +%doc README.rst %endif + %changelog +* Wed Jul 20 2022 DengXiewei - 1.4.3-6.0.1 +- Add doc sub package + * Fri Mar 16 2018 Iryna Shcherbina - 1.4.3-6 - Don't build Python 2 subpackage on EL > 7 -- Gitee