1 Star 0 Fork 27

yaokai13/python-werkzeug

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-werkzeug.spec 3.93 KB
一键复制 编辑 原始数据 按行查看 历史
jpzhang187 提交于 2020-08-11 16:53 . Remove python2-werkzeug subpackage
%global debug_package %{nil}
%global srcname Werkzeug
Name: python-werkzeug
Summary: A comprehensive WSGI web application library
Version: 0.14.1
Release: 8
License: BSD
URL: http://werkzeug.pocoo.org/
Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz
Source1: https://github.com/pallets/werkzeug/archive/0.14.1.tar.gz
# https://github.com/pallets/werkzeug/pull/1293
# skip tests that use a fixture called 'subprocess' when pytest-xprocess
# is not installed
Patch0: Skip-tests-that-use-xprocess-fixture-when-not-installed.patch
# Fix test fail with python3.8
Patch1: werkzeug-fix-tests-for-nightly-and-osx.patch
%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 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
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 %{srcname}-%{version} -p1
%{__sed} -i 's/\r//' LICENSE
%{__sed} -i '1d' tests/multipart/test_collect.py
tar -xf %{SOURCE1}
find -name '_themes' -type d -exec cp -r {} docs/ \;
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
sed -i "s/'python'/'python3'/ p" tests/test_serving.py
%build
werkzeug_build() {
find examples/ -name '*.py' -executable | xargs chmod -x
find examples/ -name '*.png' -executable | xargs chmod -x
pushd docs
# Add a symlink to the dir with the Python module so that __version__ can be
# obtained therefrom.
ln -s ../werkzeug werkzeug
make html
popd
}
%py3_build
werkzeug_build
%install
werkzeug_install() {
%{__rm} -rf docs/_build/html/.buildinfo
%{__rm} -rf examples/cupoftee/db.pyc
}
%py3_install
werkzeug_install
%check
PYTHONPATH=./ py.test-3
%files -n python3-werkzeug
%license LICENSE AUTHORS
%doc PKG-INFO CHANGES.rst
%{python3_sitelib}/*
%files -n python3-werkzeug-doc
%doc docs/_build/html examples
%changelog
* Tue Aug 11 2020 zhangjiapeng <[email protected]> - 0.14.1-8
- Remove python2-werkzeug subpackage
* Wed Jun 24 2020 lingsheng <[email protected]> - 0.14.1-7
- Fix test fail with python3.8
* Mon Nov 4 2019 openEuler Buildteam <[email protected]> - 0.14.1-4
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yaokai13/python-werkzeug.git
[email protected]:yaokai13/python-werkzeug.git
yaokai13
python-werkzeug
python-werkzeug
master

搜索帮助