remove python2

From: @wangxiao65
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-09-11 11:54:17 +08:00 committed by wangjie
commit 28519a549f

View File

@ -4,15 +4,14 @@
Name: python-%{modname} Name: python-%{modname}
Version: 0.16 Version: 0.16
Release: 3 Release: 5
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
License: Public Domain and BSD and Python and GPLv3+ License: Public Domain and BSD and Python and GPLv3+
URL: http://docutils.sourceforge.net URL: http://docutils.sourceforge.net
Source0: http://downloads.sourceforge.net/docutils/docutils-0.16.tar.gz Source0: http://downloads.sourceforge.net/docutils/docutils-0.16.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-setuptools BuildRequires: python3-devel
BuildRequires: python3-devel python2-tools
Patch0000: fix-test-error.patch Patch0000: fix-test-error.patch
%global _description \ %global _description \
@ -24,18 +23,9 @@ to use, what-you-see-is-what-you-get plaintext markup language.
%description %description
%{_description} %{_description}
%package -n python2-%{modname}
Summary: %{summary} for python2
%{?python_provide:%python_provide python2-%{modname}}
Provides: docutils = %{version}-%{release}
Obsoletes: docutils < %{version}-%{release}
%description -n python2-%{modname}
%{_description}
%package -n python3-%{modname} %package -n python3-%{modname}
Summary: %{summary} for python3 Summary: %{summary} for python3
Requires: python3-lxml
%{?python_provide:%python_provide python3-%{modname}} %{?python_provide:%python_provide python3-%{modname}}
%description -n python3-%{modname} %description -n python3-%{modname}
@ -67,15 +57,11 @@ rm -rf test/test_writers/test_odt.py
popd popd
%build %build
%py2_build
pushd %{py3dir} pushd %{py3dir}
%py3_build %py3_build
popd popd
%install %install
%py2_install
rm -rf %{buildroot}%{python3_sitelib}/test rm -rf %{buildroot}%{python3_sitelib}/test
mv %{flashfilepath}%{flashfilename} ./%{flashfilename} mv %{flashfilepath}%{flashfilename} ./%{flashfilename}
@ -91,10 +77,6 @@ done
%check %check
mv %{flashfilename} %{flashfilepath}%{flashfilename}
python2 test/alltests.py
rm %{flashfilepath}%{flashfilename}
pushd %{py3dir} pushd %{py3dir}
mv %{flashfilename} %{flashfilepath}%{flashfilename} mv %{flashfilename} %{flashfilepath}%{flashfilename}
python3 test/alltests.py python3 test/alltests.py
@ -102,10 +84,6 @@ rm %{flashfilepath}%{flashfilename}
popd popd
%files -n python2-%{modname}
%license COPYING.txt licenses/*.txt
%{python2_sitelib}/*
%files -n python3-%{modname} %files -n python3-%{modname}
%license COPYING.txt licenses/*.txt %license COPYING.txt licenses/*.txt
%{python3_sitelib}/* %{python3_sitelib}/*
@ -116,6 +94,15 @@ popd
%doc THANKS.txt docs tools/editors %doc THANKS.txt docs tools/editors
%changelog %changelog
* Mon Nov 2 2020 wangjie<wangjie294@huawei.com> -0.16-5
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2
* Thu Sep 10 2020 wangxiao <wangxiao65@huawei.com> - 0.16-4
- fix rst2odt_prepstyles error
* Mon Aug 3 2020 wutao <wutao61@huawei.com> - 0.16-3 * Mon Aug 3 2020 wutao <wutao61@huawei.com> - 0.16-3
- fix test error problem - fix test error problem