1 Star 0 Fork 27

sugarfillet/python-werkzeug

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-werkzeug.spec 4.57 KB
一键复制 编辑 原始数据 按行查看 历史
ultra_planet 提交于 2020-01-13 11:51 . rebase source
%global debug_package %{nil}
%global srcname Werkzeug
Name: python-werkzeug
Summary: A comprehensive WSGI web application library
Version: 0.14.1
Release: 6
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
%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 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
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 -Sgit
%{__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/ \;
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%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
}
%py2_build
werkzeug_build
pushd %{py3dir}
%py3_build
werkzeug_build
popd
%install
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
%doc PKG-INFO CHANGES.rst
%{python3_sitelib}/*
%files -n python3-werkzeug-doc
%doc docs/_build/html examples
%changelog
* Mon Nov 4 2019 openEuler Buildteam <[email protected]> - 0.14.1-4
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sugarfillet/python-werkzeug.git
[email protected]:sugarfillet/python-werkzeug.git
sugarfillet
python-werkzeug
python-werkzeug
master

搜索帮助