2013-09-09 08:28:22 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-falcon
|
|
|
|
#
|
2020-03-17 04:49:11 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2013-09-09 08:28:22 +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-05-22 12:49:21 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-05-06 23:30:53 +00:00
|
|
|
#
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
|
2017-08-19 05:56:06 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-03-17 04:49:11 +00:00
|
|
|
%define skip_python2 1
|
2013-09-09 08:28:22 +00:00
|
|
|
Name: python-falcon
|
2019-05-22 12:49:21 +00:00
|
|
|
Version: 2.0.0
|
2013-09-09 08:28:22 +00:00
|
|
|
Release: 0
|
2017-08-28 04:14:36 +00:00
|
|
|
Summary: A web framework for building APIs and app backends
|
2015-05-06 23:30:53 +00:00
|
|
|
License: Apache-2.0
|
2013-09-09 08:28:22 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-06-06 09:27:16 +00:00
|
|
|
URL: http://falconframework.org
|
2018-01-29 00:33:44 +00:00
|
|
|
Source: https://github.com/falconry/falcon/archive/%{version}.tar.gz#./falcon-%{version}.tar.gz
|
|
|
|
# The file on pypi misses docs/ext, should be fixed in next version
|
|
|
|
# Source: https://files.pythonhosted.org/packages/source/f/falcon/falcon-%%{version}.tar.gz
|
2019-05-22 12:49:21 +00:00
|
|
|
# github pygments style is not available
|
|
|
|
Patch0: python-falcon-sphinx-pygments-style.patch
|
2019-06-06 09:27:16 +00:00
|
|
|
BuildRequires: %{python_module PyYAML}
|
|
|
|
BuildRequires: %{python_module ddt}
|
2018-01-29 00:33:44 +00:00
|
|
|
# TODO: Cython support
|
2018-04-19 22:01:53 +00:00
|
|
|
#BuildRequires: %%{python_module Cython}
|
2017-08-19 05:56:06 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module fixtures >= 1.3.0}
|
2017-10-05 14:41:51 +00:00
|
|
|
BuildRequires: %{python_module jsonschema}
|
|
|
|
BuildRequires: %{python_module msgpack-python}
|
2019-05-22 12:49:21 +00:00
|
|
|
BuildRequires: %{python_module pecan}
|
2017-08-19 05:56:06 +00:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module python-mimeparse >= 1.5.2}
|
|
|
|
BuildRequires: %{python_module requests}
|
2019-06-06 09:27:16 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-08-19 05:56:06 +00:00
|
|
|
BuildRequires: %{python_module six >= 1.4.0}
|
|
|
|
BuildRequires: %{python_module testtools}
|
2019-05-22 12:49:21 +00:00
|
|
|
BuildRequires: %{python_module ujson}
|
2019-06-06 09:27:16 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2017-08-19 05:56:06 +00:00
|
|
|
BuildRequires: python3-Sphinx
|
2018-01-28 23:53:41 +00:00
|
|
|
BuildRequires: python3-pygments-style-railscasts
|
2018-04-19 22:01:53 +00:00
|
|
|
#Requires: python-Cython
|
2016-01-29 15:53:48 +00:00
|
|
|
Requires: python-python-mimeparse
|
2013-09-09 08:28:22 +00:00
|
|
|
Requires: python-six
|
2019-06-06 09:27:16 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2018-03-06 14:31:29 +00:00
|
|
|
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
|
2017-08-19 05:56:06 +00:00
|
|
|
Suggests: %{name}-doc
|
2018-02-27 21:32:50 +00:00
|
|
|
%endif
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%package -n %{name}-doc
|
2019-06-06 09:27:16 +00:00
|
|
|
Summary: Documentation files for %{name}
|
2017-08-19 05:56:06 +00:00
|
|
|
Group: Documentation/HTML
|
2019-06-06 09:27:16 +00:00
|
|
|
Provides: %{python_module falcon-doc = %{version}}
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%description
|
2017-08-28 04:14:36 +00:00
|
|
|
Falcon is a Python framework for building cloud
|
2013-09-09 08:28:22 +00:00
|
|
|
APIs. It encourages the REST architectural style, and tries to do
|
2017-08-28 04:14:36 +00:00
|
|
|
as little as possible while remaining effective.
|
2013-09-09 08:28:22 +00:00
|
|
|
|
2017-08-19 05:56:06 +00:00
|
|
|
%description -n %{name}-doc
|
2019-06-06 09:27:16 +00:00
|
|
|
HTML documentation including API documentation and changelog for %{name}.
|
2017-08-19 05:56:06 +00:00
|
|
|
|
2013-09-09 08:28:22 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n falcon-%{version}
|
2017-09-04 05:32:08 +00:00
|
|
|
%patch0 -p1
|
2015-05-06 23:30:53 +00:00
|
|
|
# remove unwanted shebang
|
2018-01-29 00:33:44 +00:00
|
|
|
sed -i '1s/^#!.*//' falcon/bench/bench.py falcon/cmd/print_routes.py falcon/bench/dj/manage.py
|
|
|
|
chmod a-x falcon/bench/dj/manage.py
|
2019-06-11 09:20:45 +00:00
|
|
|
# we don't want to require rapidjson just for testing
|
|
|
|
rm tests/test_media_handlers.py
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%build
|
2017-08-19 05:56:06 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
%python_build
|
|
|
|
pushd docs
|
|
|
|
PYTHONPATH=$PATH:.. make html
|
|
|
|
rm _build/html/.buildinfo
|
|
|
|
popd
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%install
|
2019-06-06 09:27:16 +00:00
|
|
|
%python_install
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
2019-06-06 09:27:16 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%check
|
2017-09-04 05:32:08 +00:00
|
|
|
export LANG=en_US.UTF8
|
2019-05-22 12:49:21 +00:00
|
|
|
%pytest
|
2013-09-09 08:28:22 +00:00
|
|
|
|
2017-08-19 05:56:06 +00:00
|
|
|
%post
|
|
|
|
%{python_install_alternative falcon-bench falcon-print-routes}
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%{python_uninstall_alternative falcon-bench falcon-print-routes}
|
|
|
|
|
|
|
|
%files %{python_files}
|
2019-05-22 12:49:21 +00:00
|
|
|
%doc README.rst CHANGES.rst
|
2018-04-19 22:01:53 +00:00
|
|
|
%license LICENSE
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_alternative %{_bindir}/falcon-bench
|
|
|
|
%python_alternative %{_bindir}/falcon-print-routes
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%files -n %{name}-doc
|
|
|
|
%doc docs/_build/html
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%changelog
|