2013-01-17 10:50:55 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-pecan
|
|
|
|
|
#
|
2021-05-06 05:28:32 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
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.
|
|
|
|
|
|
2019-04-24 10:27:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-02-22 13:10:10 +00:00
|
|
|
#
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
|
2021-10-03 17:47:00 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
|
%bcond_without libalternatives
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with libalternatives
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-06-30 14:25:06 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-05-06 05:28:32 +00:00
|
|
|
%define skip_python2 1
|
2013-01-17 10:50:55 +00:00
|
|
|
Name: python-pecan
|
2021-12-11 22:35:13 +00:00
|
|
|
Version: 1.4.1
|
2013-01-17 10:50:55 +00:00
|
|
|
Release: 0
|
2018-08-16 10:19:06 +00:00
|
|
|
Summary: A WSGI object-dispatching web framework
|
2013-02-22 13:10:10 +00:00
|
|
|
License: BSD-3-Clause
|
2018-08-09 09:57:20 +00:00
|
|
|
URL: https://github.com/pecan/pecan
|
2017-06-30 14:25:06 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pecan/pecan-%{version}.tar.gz
|
2018-08-09 09:57:20 +00:00
|
|
|
Patch0: pecan-no-kajiki.patch
|
|
|
|
|
BuildRequires: %{python_module Genshi >= 0.7}
|
2017-06-30 14:25:06 +00:00
|
|
|
BuildRequires: %{python_module Jinja2}
|
|
|
|
|
BuildRequires: %{python_module Mako >= 0.4.0}
|
|
|
|
|
BuildRequires: %{python_module SQLAlchemy}
|
2021-05-06 05:28:32 +00:00
|
|
|
BuildRequires: %{python_module WebOb >= 1.8}
|
2017-06-30 14:25:06 +00:00
|
|
|
BuildRequires: %{python_module WebTest >= 1.3.1}
|
|
|
|
|
BuildRequires: %{python_module gunicorn}
|
|
|
|
|
BuildRequires: %{python_module logutils}
|
|
|
|
|
BuildRequires: %{python_module mock}
|
2018-08-09 09:57:20 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: %{python_module six}
|
2017-06-30 14:25:06 +00:00
|
|
|
BuildRequires: %{python_module virtualenv}
|
2021-05-06 05:28:32 +00:00
|
|
|
BuildRequires: uwsgi
|
2020-03-14 08:02:16 +00:00
|
|
|
# we need sqlite module
|
|
|
|
|
BuildRequires: %{pythons}
|
2018-08-09 09:57:20 +00:00
|
|
|
BuildRequires: fdupes
|
2021-10-03 17:47:00 +00:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2014-01-10 20:59:03 +00:00
|
|
|
Requires: python-Mako >= 0.4.0
|
2021-05-06 05:28:32 +00:00
|
|
|
Requires: python-WebOb >= 1.8
|
2014-01-10 20:59:03 +00:00
|
|
|
Requires: python-WebTest >= 1.3.1
|
2015-02-24 13:16:57 +00:00
|
|
|
Requires: python-logutils >= 0.3
|
2019-04-24 10:27:14 +00:00
|
|
|
Requires: python-setuptools
|
2018-08-09 09:57:20 +00:00
|
|
|
Requires: python-six
|
2021-10-03 17:47:00 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
|
Requires: alts
|
2021-10-06 07:32:08 +00:00
|
|
|
BuildRequires: alts
|
2021-10-03 17:47:00 +00:00
|
|
|
%else
|
2018-08-09 09:57:20 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-05-06 05:28:32 +00:00
|
|
|
Requires(postun):update-alternatives
|
2021-10-03 17:47:00 +00:00
|
|
|
%endif
|
2018-08-09 09:57:20 +00:00
|
|
|
BuildArch: noarch
|
2015-07-27 06:14:48 +00:00
|
|
|
%if 0%{?suse_version}
|
2013-01-17 10:50:55 +00:00
|
|
|
Suggests: python-Genshi
|
2018-08-09 09:57:20 +00:00
|
|
|
Suggests: python-Jinja2
|
2013-02-22 13:10:10 +00:00
|
|
|
Suggests: python-gunicorn
|
2015-07-27 06:14:48 +00:00
|
|
|
%endif
|
2017-06-30 14:25:06 +00:00
|
|
|
%python_subpackages
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
%description
|
2018-08-16 10:19:06 +00:00
|
|
|
A WSGI object-dispatching web framework.
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n pecan-%{version}
|
2018-08-09 09:57:20 +00:00
|
|
|
%patch0 -p1
|
2021-05-06 05:28:32 +00:00
|
|
|
sed -ie "/^uwsgi$/d" test-requirements.txt
|
|
|
|
|
sed -ie "/^pep8$/d" test-requirements.txt
|
2013-01-17 10:50:55 +00:00
|
|
|
|
|
|
|
|
%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
|
2018-08-09 09:57:20 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-09-19 17:10:21 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pecan
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan
|
2013-01-17 10:50:55 +00:00
|
|
|
|
2014-09-23 19:04:47 +00:00
|
|
|
%check
|
2021-05-27 09:57:16 +00:00
|
|
|
%pyunittest discover -v
|
2013-01-17 10:50:55 +00:00
|
|
|
|
2021-10-03 17:47:00 +00:00
|
|
|
%pre
|
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
|
%python_libalternatives_reset_alternative pecan
|
|
|
|
|
%python_libalternatives_reset_alternative gunicorn_pecan
|
|
|
|
|
|
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}
|
2018-08-09 09:57:20 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc 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
|