From b4f682291537074985ef30e93959cc35ab6918a5 Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Tue, 11 Aug 2020 15:25:41 +0800 Subject: [PATCH 1/2] Del Python2-testtools python2 is EOL and we recomand python3 (cherry picked from commit fcd29bbe2dfe0f58d8c62f2cba1ed116f89d1a44) --- python-testtools.spec | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/python-testtools.spec b/python-testtools.spec index bf724cb..c345c8b 100644 --- a/python-testtools.spec +++ b/python-testtools.spec @@ -1,6 +1,6 @@ Name: python-testtools Version: 2.3.0 -Release: 11 +Release: 12 Summary: Extensions to the Python unit testing framework License: MIT URL: https://launchpad.net/testtools @@ -9,10 +9,8 @@ Source0: https://pypi.io/packages/source/t/testtools/testtools-%{version} Patch0001: testtools-1.8.0-py3.patch Patch0002: testtools-2.3.0-py37.patch -BuildRequires: python2-devel python2-extras python2-mimeparse >= 0.1.4 python2-pbr python2-setuptools -BuildRequires: python2-unittest2 >= 1.0.0 python2-traceback2 python2-testscenarios python3-devel BuildRequires: python3-extras python3-mimeparse python3-pbr python3-setuptools python3-unittest2 -BuildRequires: python3-traceback2 python3-testscenarios python3-sphinx +BuildRequires: python3-traceback2 python3-testscenarios python3-sphinx python3-devel BuildArch: noarch %description @@ -20,16 +18,6 @@ Testtools is a set of extensions to the Python standard library's unit testing f extensions have been derived from years of experience with unit testing in Python and come from many different sources. -%package -n python2-testtools -Summary: Extensions to the Python unit testing framework -Requires: python2-extras python2-mimeparse python2-pbr python2-unittest2 >= 1.0.0 python2-traceback2 -%{?python_provide:%python_provide python2-testtools} - -%description -n python2-testtools -Testtools is a set of extensions to the Python standard library's unit testing framework. These -extensions have been derived from years of experience with unit testing in Python and come from -many different sources. - %package -n python3-testtools Summary: Extensions to the Python unit testing framework Requires: python3-extras python3-mimeparse python3-pbr python3-unittest2 >= 1.0.0 python3-traceback2 @@ -41,7 +29,7 @@ many different sources. %package help Summary: Documentation for python-testtools -Requires: python2-testtools = %{version}-%{release} +Requires: python3-testtools = %{version}-%{release} Provides: bundled(jquery) %{name}-doc = %{version}-%{release} Obsoletes: %{name}-doc < %{version}-%{release} @@ -59,25 +47,18 @@ find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' rm -f %{py3dir}/testtools/_compat2x.py %{_builddir}/testtools-%{version}/testtools/_compat3x.py %build -%{__python2} setup.py build PYTHONPATH=$PWD make -C doc html cd %{py3dir} %{__python3} setup.py build %install -%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT cd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %check -make PYTHON=%{__python2} check cd %{py3dir} make PYTHON=%{__python3} check -%files -n python2-testtools -%doc LICENSE NEWS README.rst -%{python2_sitelib}/* - %files -n python3-testtools %doc LICENSE NEWS README.rst %{python3_sitelib}/* @@ -86,6 +67,9 @@ make PYTHON=%{__python3} check %doc doc/_build/html/* %changelog +* Tue Aug 11 2020 zhangtao - 2.3.0-12 +- Del Python2-testtools python2 is EOL and we recomand python3 + * Thu Feb 20 2020 lingsheng - 2.3.0-11 - Modify buildrequires to fix build fail -- Gitee From 6960373bec6e685a708ec0fdfb2906b2f583f9a2 Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Tue, 11 Aug 2020 15:28:08 +0800 Subject: [PATCH 2/2] del python2-testtools python2 is EOL and we recommend python3 (cherry picked from commit 5360cd0cc49a23775a496f75c5ffe687bd2b44fd) --- python-testtools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-testtools.spec b/python-testtools.spec index c345c8b..7f0c09d 100644 --- a/python-testtools.spec +++ b/python-testtools.spec @@ -68,7 +68,7 @@ make PYTHON=%{__python3} check %changelog * Tue Aug 11 2020 zhangtao - 2.3.0-12 -- Del Python2-testtools python2 is EOL and we recomand python3 +- Del Python2-testtools python2 is EOL and we recommend python3 * Thu Feb 20 2020 lingsheng - 2.3.0-11 - Modify buildrequires to fix build fail -- Gitee