2013-01-17 10:50:55 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-pecan
|
|
|
|
|
#
|
2017-06-30 14:25:06 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-01-17 10:50:55 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2013-02-22 13:10:10 +00:00
|
|
|
#
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
|
2017-06-30 14:25:06 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-01-17 10:50:55 +00:00
|
|
|
Name: python-pecan
|
2016-11-15 11:01:55 +00:00
|
|
|
Version: 1.2.1
|
2013-01-17 10:50:55 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A WSGI object-dispatching web framework, designed to be lean and fast
|
2013-02-22 13:10:10 +00:00
|
|
|
License: BSD-3-Clause
|
2013-01-17 10:50:55 +00:00
|
|
|
Group: Development/Languages/Python
|
2013-02-22 13:10:10 +00:00
|
|
|
Url: http://github.com/dreamhost/pecan
|
2017-06-30 14:25:06 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pecan/pecan-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2013-01-17 10:50:55 +00:00
|
|
|
# Test requirements:
|
2014-11-10 23:25:14 +00:00
|
|
|
%if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315
|
2017-06-30 14:25:06 +00:00
|
|
|
BuildRequires: %{python_module Genshi}
|
|
|
|
|
BuildRequires: %{python_module Jinja2}
|
|
|
|
|
BuildRequires: %{python_module Kajiki}
|
|
|
|
|
BuildRequires: %{python_module Mako >= 0.4.0}
|
|
|
|
|
BuildRequires: %{python_module SQLAlchemy}
|
|
|
|
|
BuildRequires: %{python_module WebTest >= 1.3.1}
|
|
|
|
|
BuildRequires: %{python_module gunicorn}
|
|
|
|
|
BuildRequires: %{python_module logutils}
|
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
|
BuildRequires: %{python_module virtualenv}
|
|
|
|
|
BuildRequires: python2-singledispatch
|
2015-06-23 08:45:22 +00:00
|
|
|
%endif
|
2017-06-30 14:25:06 +00:00
|
|
|
BuildRequires: %{python_module six}
|
2014-01-10 20:59:03 +00:00
|
|
|
Requires: python-Mako >= 0.4.0
|
|
|
|
|
Requires: python-WebOb >= 1.2dev
|
|
|
|
|
Requires: python-WebTest >= 1.3.1
|
2015-02-24 13:16:57 +00:00
|
|
|
Requires: python-logutils >= 0.3
|
2014-01-10 20:59:03 +00:00
|
|
|
Requires: python-singledispatch
|
|
|
|
|
Requires: python-six
|
2015-07-27 06:14:48 +00:00
|
|
|
%if 0%{?suse_version}
|
2013-01-17 10:50:55 +00:00
|
|
|
Suggests: python-Jinja2
|
|
|
|
|
Suggests: python-Genshi
|
2013-02-22 13:10:10 +00:00
|
|
|
Suggests: python-gunicorn
|
2015-07-27 06:14:48 +00:00
|
|
|
%endif
|
2013-01-17 10:50:55 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-06-30 14:25:06 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun): update-alternatives
|
2013-01-17 10:50:55 +00:00
|
|
|
BuildArch: noarch
|
2017-06-30 14:25:06 +00:00
|
|
|
|
|
|
|
|
%python_subpackages
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n pecan-%{version}
|
2013-02-22 13:10:10 +00:00
|
|
|
# Let's not depend on Kajiki, a Genshi clone. Genshi should be enough:
|
2013-01-17 10:50:55 +00:00
|
|
|
sed -i "/'Kajiki',/d" setup.py
|
|
|
|
|
|
|
|
|
|
%build
|
2017-06-30 14:25:06 +00:00
|
|
|
%python_build
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-06-30 14:25:06 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pecan
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan
|
2013-01-17 10:50:55 +00:00
|
|
|
|
2014-11-10 23:25:14 +00:00
|
|
|
%if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315
|
2014-09-23 19:04:47 +00:00
|
|
|
%check
|
2017-06-30 14:25:06 +00:00
|
|
|
%python_exec setup.py test
|
2014-09-23 19:04:47 +00:00
|
|
|
%endif
|
2013-01-17 10:50:55 +00:00
|
|
|
|
2017-06-30 14:25:06 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative pecan
|
|
|
|
|
%python_install_alternative gunicorn_pecan
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative pecan
|
|
|
|
|
%python_uninstall_alternative gunicorn_pecan
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2013-01-17 10:50:55 +00:00
|
|
|
%defattr(-,root,root,-)
|
2013-11-28 16:12:50 +00:00
|
|
|
%doc LICENSE README.rst
|
2017-06-30 14:25:06 +00:00
|
|
|
%python_alternative %{_bindir}/pecan
|
|
|
|
|
%python_alternative %{_bindir}/gunicorn_pecan
|
2013-01-17 10:50:55 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|