From eb91e68728b8777db6833f78bda5bbc3110edeab Mon Sep 17 00:00:00 2001 From: FFrog Date: Tue, 15 Feb 2022 10:08:25 +0800 Subject: [PATCH] Remove the support of python2 --- python-werkzeug.spec | 52 ++++++-------------------------------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/python-werkzeug.spec b/python-werkzeug.spec index bb656b3..3f39d61 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -1,9 +1,10 @@ %global srcname Werkzeug %global modname werkzeug + Name: python-werkzeug Summary: A comprehensive WSGI web application library Version: 1.0.1 -Release: 1 +Release: 2 License: BSD URL: https://github.com/pallets/werkzeug Source0: https://github.com/pallets/werkzeug/archive/1.0.1.tar.gz @@ -35,31 +36,15 @@ applications such as blogs, wikis, or bulletin boards.\ %description %_description -%package -n python2-werkzeug -Summary: %summary - -BuildRequires: python2-devel python2-setuptools git -# For tests -BuildRequires: python2-pytest python2-hypothesis python2-requests python2-pyOpenSSL -BuildRequires: python2-greenlet python2-redis - -%{?python_provide:%python_provide python2-werkzeug} - -%description -n python2-werkzeug %_description - %package -n python3-werkzeug Summary: %summary - BuildRequires: python3-devel python3-setuptools git -# For tests BuildRequires: python3-pytest python3-hypothesis python3-requests python3-pyOpenSSL -BuildRequires: python3-greenlet python3-redis - +BuildRequires: python3-greenlet python3-redis python3-pytest-timeout %{?python_provide:%python_provide python3-werkzeug} %description -n python3-werkzeug %_description - %package -n python3-werkzeug-doc Summary: Documentation for python3-werkzeug BuildRequires: python3-sphinx python3dist(pallets-sphinx-themes) @@ -70,48 +55,23 @@ Requires: python3-werkzeug = %{version}-%{release} %description -n python3-werkzeug-doc Documentation and examples for python3-werkzeug. - %prep %autosetup -n %{modname}-%{version} -p1 -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' - - %build -%py2_build - -pushd %{py3dir} %py3_build pushd docs -make PYTHONPATH=../src/ SPHINXBUILD=sphinx-build-3 html +make PYTHONPATH=../src/ SPHINXBUILD=sphinx-build html rm -v _build/html/.buildinfo popd -popd - %install -%py2_install - -pushd %{py3dir} %py3_install -popd -cp -ar %{py3dir}/docs . %check #Some tests requires the compilation environment language variable to be utf8. export LANG=en_US.utf8 -PYTHONPATH=./src/ py.test-2 - -pushd %{py3dir} PYTHONPATH=./src/ py.test-3 -popd - -%files -n python2-werkzeug -%license LICENSE.rst -%doc CHANGES.rst README.rst -%{python2_sitelib}/* %files -n python3-werkzeug %license LICENSE.rst @@ -121,8 +81,10 @@ popd %files -n python3-werkzeug-doc %doc docs/_build/html examples - %changelog +* Thur Jan 27 2022 lijiawei - 1.0.1-2 +- Remove python2 support + * Tue Aug 17 2021 huanghaitao - 1.0.1-1 - Update to 1.0.1 - Disable tests because need pytest-3.9 -- Gitee