python-werkzeug/python-werkzeug.spec
Bolehu 32c3ede609 fix typo and grammar mistake
Signed-off-by: Bolehu <heyaohua@xfusion.com>
(cherry picked from commit 6bf63cf293655950d73f73a78dc44493c9bade8a)
2023-03-29 16:54:11 +08:00

191 lines
7.6 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-werkzeug
Version: 2.0.3
Release: 2
Summary: The comprehensive WSGI web application library.
License: BSD-3-Clause
URL: https://palletsprojects.com/p/werkzeug/
Source0: https://files.pythonhosted.org/packages/6c/a8/60514fade2318e277453c9588545d0c335ea3ea6440ce5cdabfca7f73117/Werkzeug-2.0.3.tar.gz
Patch0001: backport-fix-typo-and-grammar-mistake.patch
BuildArch: noarch
BuildRequires: python3-werkzeug
Requires: python3-pytest
Requires: python3-pytest-timeout
Requires: python3-coverage
Requires: python3-tox
Requires: python3-sphinx
Requires: python3-pallets-sphinx-themes
Requires: python3-sphinx-issues
Requires: python3-watchdog
%description
*werkzeug* German noun: "tool". Etymology: *werk* ("work"), *zeug* ("stuff")
Werkzeug is a comprehensive `WSGI`_ web application library. It began as
a simple collection of various utilities for WSGI applications and has
become one of the most advanced WSGI utility libraries.
It includes:
- An interactive debugger that allows inspecting stack traces and
source code in the browser with an interactive interpreter for any
frame in the stack.
- A full-featured request object with objects to interact with
headers, query args, form data, files, and cookies.
- A response object that can wrap other WSGI applications and handle
streaming data.
- A routing system for matching URLs to endpoints and generating URLs
for endpoints, with an extensible system for capturing variables
from URLs.
- HTTP utilities to handle entity tags, cache control, dates, user
agents, cookies, files, and more.
- A threaded WSGI server for use while developing applications
locally.
- A test client for simulating HTTP requests during testing without
requiring running a server.
Werkzeug is Unicode aware and doesn't enforce any dependencies. It is up
to the developer to choose a template engine, database adapter, and even
how to handle requests. It can be used to build all sorts of end user
applications such as blogs, wikis, or bulletin boards.
`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while
providing more structure and patterns for defining powerful
applications.
%package -n python3-werkzeug
Summary: The comprehensive WSGI web application library.
Provides: python-werkzeug
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-pytest-timeout
BuildRequires: python3-requests
BuildRequires: python3-setuptools
BuildRequires: python3-cryptography
BuildRequires: python3-greenlet
%description -n python3-werkzeug
*werkzeug* German noun: "tool". Etymology: *werk* ("work"), *zeug* ("stuff")
Werkzeug is a comprehensive `WSGI`_ web application library. It began as
a simple collection of various utilities for WSGI applications and has
become one of the most advanced WSGI utility libraries.
It includes:
- An interactive debugger that allows inspecting stack traces and
source code in the browser with an interactive interpreter for any
frame in the stack.
- A full-featured request object with objects to interact with
headers, query args, form data, files, and cookies.
- A response object that can wrap other WSGI applications and handle
streaming data.
- A routing system for matching URLs to endpoints and generating URLs
for endpoints, with an extensible system for capturing variables
from URLs.
- HTTP utilities to handle entity tags, cache control, dates, user
agents, cookies, files, and more.
- A threaded WSGI server for use while developing applications
locally.
- A test client for simulating HTTP requests during testing without
requiring running a server.
Werkzeug is Unicode aware and doesn't enforce any dependencies. It is up
to the developer to choose a template engine, database adapter, and even
how to handle requests. It can be used to build all sorts of end user
applications such as blogs, wikis, or bulletin boards.
`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while
providing more structure and patterns for defining powerful
applications.
%package help
Summary: Development documents and examples for Werkzeug
Provides: python3-werkzeug-doc
%description help
*werkzeug* German noun: "tool". Etymology: *werk* ("work"), *zeug* ("stuff")
Werkzeug is a comprehensive `WSGI`_ web application library. It began as
a simple collection of various utilities for WSGI applications and has
become one of the most advanced WSGI utility libraries.
It includes:
- An interactive debugger that allows inspecting stack traces and
source code in the browser with an interactive interpreter for any
frame in the stack.
- A full-featured request object with objects to interact with
headers, query args, form data, files, and cookies.
- A response object that can wrap other WSGI applications and handle
streaming data.
- A routing system for matching URLs to endpoints and generating URLs
for endpoints, with an extensible system for capturing variables
from URLs.
- HTTP utilities to handle entity tags, cache control, dates, user
agents, cookies, files, and more.
- A threaded WSGI server for use while developing applications
locally.
- A test client for simulating HTTP requests during testing without
requiring running a server.
Werkzeug is Unicode aware and doesn't enforce any dependencies. It is up
to the developer to choose a template engine, database adapter, and even
how to handle requests. It can be used to build all sorts of end user
applications such as blogs, wikis, or bulletin boards.
`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while
providing more structure and patterns for defining powerful
applications.
%prep
%autosetup -n Werkzeug-%{version} -p1
#remove test case which depend on xprocess
sed -i '/from xprocess import ProcessStarter/, +141d' tests/conftest.py
sed -i '/@pytest.mark.filterwarnings/, +221d' tests/test_serving.py
sed -i '/@pytest.mark.filterwarnings/, +40d' tests/middleware/test_http_proxy.py
sed -i '/@pytest.mark.filterwarnings/, +11d' tests/test_debug.py
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
depath=`pwd`
depath=$depath/src/
#export PYTHONPATH=%{buildroot}%{python3_sitelib}
export PYTHONPATH=$PYTHONPATH:$depath
/usr/bin/pytest -p no:unraisableexception
%files -n python3-werkzeug -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Sat Jan 7 2023 Bolehu <heyaohua@xfusion.com> - 2.0.3-2
- fix typo and grammar mistake
* Tue Oct 25 2022 Ge Wang <wange20@h-partners.com> - 2.0.3-1
- Upgrade to version 2.0.3
* Tue Dec 21 2021 liwu <liwu13@huawei.com> - 1.2.1-2
- fix test failures due to unhandled exceptions being thrown without being propagated to caller
* Thu Feb 04 2021 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated