2013-09-09 08:28:22 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-falcon
|
|
|
|
#
|
2024-01-03 18:39:03 +00:00
|
|
|
# Copyright (c) 2024 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
|
|
|
|
|
|
|
|
2023-06-11 20:11:16 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2013-09-09 08:28:22 +00:00
|
|
|
Name: python-falcon
|
2024-02-05 12:43:31 +00:00
|
|
|
Version: 3.1.3
|
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
|
2024-02-05 12:43:31 +00:00
|
|
|
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}
|
2021-11-18 17:53:58 +00:00
|
|
|
BuildRequires: %{python_module Sphinx}
|
2019-06-06 09:27:16 +00:00
|
|
|
BuildRequires: %{python_module ddt}
|
2023-06-11 20:11:16 +00:00
|
|
|
BuildRequires: %{python_module httpx}
|
2024-02-07 08:41:30 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2021-11-18 17:53:58 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module sphinx-tabs}
|
2023-06-11 20:11:16 +00:00
|
|
|
BuildRequires: %{python_module websockets}
|
2024-02-07 08:41:30 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-01-29 00:33:44 +00:00
|
|
|
# TODO: Cython support
|
2018-04-19 22:01:53 +00:00
|
|
|
#BuildRequires: %%{python_module Cython}
|
2021-11-18 17:53:58 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module aiofiles}
|
|
|
|
BuildRequires: %{python_module cbor2}
|
2017-10-05 14:41:51 +00:00
|
|
|
BuildRequires: %{python_module msgpack-python}
|
2021-11-18 17:53:58 +00:00
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
2017-08-19 05:56:06 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module requests}
|
|
|
|
BuildRequires: %{python_module testtools}
|
2021-11-24 06:19:01 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
BuildRequires: %{python_module httpx if (%python-base without python36-base)}
|
|
|
|
BuildRequires: %{python_module uvicorn if (%python-base without python36-base)}
|
|
|
|
BuildRequires: %{python_module websockets if (%python-base without python36-base)}
|
2021-11-18 17:53:58 +00:00
|
|
|
%endif
|
2021-11-24 06:19:01 +00:00
|
|
|
# /SECTION
|
2019-06-06 09:27:16 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-04-19 22:01:53 +00:00
|
|
|
#Requires: python-Cython
|
2019-06-06 09:27:16 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-02-07 08:41:30 +00:00
|
|
|
Requires(postun): update-alternatives
|
2017-08-19 05:56:06 +00:00
|
|
|
Suggests: %{name}-doc
|
2021-11-18 17:53:58 +00:00
|
|
|
BuildArch: noarch
|
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
|
2024-02-07 08:41:30 +00:00
|
|
|
%autosetup -p1 -n falcon-%{version}
|
2015-05-06 23:30:53 +00:00
|
|
|
# remove unwanted shebang
|
2021-11-18 17:53:58 +00:00
|
|
|
sed -i '1s/^#!.*//' falcon/bench/bench.py falcon/cmd/inspect_app.py falcon/bench/dj/manage.py
|
2018-01-29 00:33:44 +00:00
|
|
|
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"
|
2024-02-07 08:41:30 +00:00
|
|
|
%pyproject_wheel
|
2021-11-18 17:53:58 +00:00
|
|
|
export PYTHONPATH="$(pwd)"
|
2017-08-19 05:56:06 +00:00
|
|
|
pushd docs
|
2021-11-18 17:53:58 +00:00
|
|
|
make html
|
2017-08-19 05:56:06 +00:00
|
|
|
rm _build/html/.buildinfo
|
|
|
|
popd
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%install
|
2024-02-07 08:41:30 +00:00
|
|
|
%pyproject_install
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
2021-11-18 17:53:58 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
2024-02-07 08:41:30 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc
|
|
|
|
cp -ar docs/_build/html examples %{buildroot}%{_defaultdocdir}/%{name}-doc/
|
|
|
|
%fdupes %{buildroot}%{_defaultdocdir}/%{name}-doc/
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%check
|
2017-09-04 05:32:08 +00:00
|
|
|
export LANG=en_US.UTF8
|
2021-11-24 06:19:01 +00:00
|
|
|
if [ %{python3_version_nodots} -eq 36 ]; then
|
|
|
|
python3_donttest=("--ignore" "tests/asgi")
|
|
|
|
fi
|
|
|
|
%pytest "${$python_donttest[@]}" tests
|
2013-09-09 08:28:22 +00:00
|
|
|
|
2017-08-19 05:56:06 +00:00
|
|
|
%post
|
2021-11-18 17:53:58 +00:00
|
|
|
%{python_install_alternative falcon-bench falcon-inspect-app falcon-print-routes}
|
2017-08-19 05:56:06 +00:00
|
|
|
|
|
|
|
%postun
|
2021-11-24 06:19:01 +00:00
|
|
|
%python_uninstall_alternative falcon-bench
|
2017-08-19 05:56:06 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
2024-02-07 08:41:30 +00:00
|
|
|
%doc README.rst
|
2018-04-19 22:01:53 +00:00
|
|
|
%license LICENSE
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_alternative %{_bindir}/falcon-bench
|
2021-11-18 17:53:58 +00:00
|
|
|
%python_alternative %{_bindir}/falcon-inspect-app
|
2017-08-19 05:56:06 +00:00
|
|
|
%python_alternative %{_bindir}/falcon-print-routes
|
2021-11-24 06:19:01 +00:00
|
|
|
%{python_sitelib}/falcon
|
2024-02-07 08:41:30 +00:00
|
|
|
%{python_sitelib}/falcon-%{version}.dist-info
|
2017-08-19 05:56:06 +00:00
|
|
|
|
|
|
|
%files -n %{name}-doc
|
2024-02-07 08:41:30 +00:00
|
|
|
%doc %{_defaultdocdir}/%{name}-doc
|
2013-09-09 08:28:22 +00:00
|
|
|
|
|
|
|
%changelog
|