137 lines
4.0 KiB
RPMSpec
137 lines
4.0 KiB
RPMSpec
%global srcname Werkzeug
|
|
%global modname werkzeug
|
|
Name: python-werkzeug
|
|
Summary: A comprehensive WSGI web application library
|
|
Version: 1.0.1
|
|
Release: 2
|
|
License: BSD
|
|
URL: https://github.com/pallets/werkzeug
|
|
Source0: https://github.com/pallets/werkzeug/archive/1.0.1.tar.gz
|
|
Patch0: Disable-tests-because-need-pytest-3.9.patch
|
|
Patch1: CVE-2023-23934.patch
|
|
Patch2: CVE-2023-25577.patch
|
|
BuildArch: noarch
|
|
|
|
%global _description\
|
|
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.\
|
|
|
|
%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
|
|
|
|
%{?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)
|
|
BuildRequires: python3dist(sphinx-issues) python3-sphinxcontrib-log-cabinet
|
|
Requires: python3-werkzeug = %{version}-%{release}
|
|
%{?python_provide:%python_provide python3-werkzeug-doc}
|
|
|
|
%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
|
|
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
|
|
%doc CHANGES.rst README.rst
|
|
%{python3_sitelib}/*
|
|
|
|
%files -n python3-werkzeug-doc
|
|
%doc docs/_build/html examples
|
|
|
|
|
|
%changelog
|
|
* Mon Aug 14 2023 yaoxin <yao_xin001@hoperun.com> - 1.0.1-2
|
|
- Fix CVE-2023-23934 and CVE-2023-25577
|
|
|
|
* Tue Aug 17 2021 huanghaitao <huanghaitao8@huawei.com> - 1.0.1-1
|
|
- Update to 1.0.1
|
|
- Disable tests because need pytest-3.9
|
|
|
|
* Mon Nov 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14.1-4
|
|
- Package init
|