Remove python2-werkzeug subpackage

This commit is contained in:
jpzhang 2020-08-11 16:37:40 +08:00
parent 258d9f7314
commit 3f93629d9f

View File

@ -42,28 +42,6 @@ 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 python2-werkzeug-doc
Summary: Documentation for %{name}
BuildRequires: python2-sphinx
Requires: python2-werkzeug = %{version}-%{release}
%{?python_provide:%python_provide python2-werkzeug-doc}
%description -n python2-werkzeug-doc
Documentation and examples for %{name}.
%package -n python3-werkzeug
Summary: %summary
@ -94,10 +72,8 @@ Documentation and examples for python3-werkzeug.
tar -xf %{SOURCE1}
find -name '_themes' -type d -exec cp -r {} docs/ \;
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
sed -i "s/'python'/'python3'/ p" tests/test_serving.py
%build
werkzeug_build() {
@ -111,13 +87,8 @@ werkzeug_build() {
popd
}
%py2_build
werkzeug_build
pushd %{py3dir}
%py3_build
werkzeug_build
popd
%install
@ -125,28 +96,11 @@ werkzeug_install() {
%{__rm} -rf docs/_build/html/.buildinfo
%{__rm} -rf examples/cupoftee/db.pyc
}
%py2_install
werkzeug_install
pushd %{py3dir}
%py3_install
werkzeug_install
popd
%check
PYTHONPATH=./ py.test-2
pushd %{py3dir}
PYTHONPATH=./ py.test-3
popd
%files -n python2-werkzeug
%license LICENSE AUTHORS
%doc PKG-INFO CHANGES.rst
%{python2_sitelib}/*
%files -n python2-werkzeug-doc
%doc docs/_build/html examples
%files -n python3-werkzeug
%license LICENSE AUTHORS
@ -158,6 +112,9 @@ popd
%changelog
* Tue Aug 11 2020 zhangjiapeng <zhangjiapeng@huawei.com> - 0.14.1-8
- Remove python2-werkzeug subpackage
* Wed Jun 24 2020 lingsheng <lingsheng@huawei.com> - 0.14.1-7
- Fix test fail with python3.8