105f618
%global commit      0e96f88704a940ed8eda7299a27f2c9dbb6fcf09
4642b54
%global shortcommit %(c=%{commit}; echo ${c:0:7})
bafce64
df8f695
%global common_description %{expand:
4642b54
Falcon is a minimalist ASGI/WSGI framework for building mission-critical REST
4642b54
APIs and microservices, with a focus on reliability, correctness, and
4642b54
performance at scale.  When it comes to building HTTP APIs, other frameworks
4642b54
weigh you down with tons of dependencies and unnecessary abstractions. Falcon
4642b54
cuts to the chase with a clean design that embraces HTTP and the REST
4642b54
architectural style.}
4642b54
4642b54
4642b54
Name:           python-falcon
105f618
Version:        4.0.0~^2.%{shortcommit}
91824b7
Release:        %autorelease
4642b54
Summary:        Fast ASGI+WSGI framework for building data plane APIs at scale
4642b54
License:        Apache-2.0
Carl George 46632f4
URL:            https://falconframework.org
4642b54
Source:         https://github.com/falconry/falcon/archive/%{commit}/falcon-%{shortcommit}.tar.gz
7b4971c
7b4971c
# downstream-only patch to remove bundled library
4642b54
Patch:          0001-Use-system-mimeparse.patch
7b4971c
444d79a
BuildRequires:  gcc
Jamie Lennox 218320a
carlgeorge b096bfd
df8f695
%description %{common_description}
carlgeorge b096bfd
a68f005
4642b54
%package -n python3-falcon
Carl George 46632f4
Summary:        %{summary}
a68f005
BuildRequires:  python3-devel
4642b54
BuildRequires:  %{py3_dist setuptools pip wheel cython}
a68f005
# requirements/tests
a68f005
BuildRequires:  %{py3_dist pytest pyyaml requests testtools}
105f618
BuildRequires:  %{py3_dist pytest-asyncio httpx aiofiles websockets}
acfdba7
BuildRequires:  %{py3_dist cbor2 msgpack mujson ujson python-mimeparse}
carlgeorge b096bfd
Jamie Lennox 218320a
4642b54
%description -n python3-falcon %{common_description}
Jamie Lennox 218320a
carlgeorge b096bfd
Jamie Lennox 218320a
%prep
4642b54
%autosetup -p 1 -n falcon-%{commit}
7b4971c
rm -rf falcon/vendor
7b4971c
Jamie Lennox 218320a
Jamie Lennox 218320a
%build
4642b54
%pyproject_wheel
Jamie Lennox 218320a
a68f005
carlgeorge b096bfd
%install
4642b54
%pyproject_install
4642b54
%pyproject_save_files falcon
Jamie Lennox 218320a
a68f005
233caeb
%check
105f618
# skip tests that fail on python 3.12
105f618
%pytest -k 'not test_client_disconnect_early and not test_ws_http_error_or_status_response and not test_ws_http_error_or_status_error_handler' tests
Jamie Lennox 218320a
a68f005
4642b54
%files -n python3-falcon -f %{pyproject_files}
Jamie Lennox 63ac7a5
%doc README.rst
4806e64
%{_bindir}/falcon-bench
a68f005
%{_bindir}/falcon-inspect-app
4806e64
%{_bindir}/falcon-print-routes
Jamie Lennox 218320a
carlgeorge b096bfd
Jamie Lennox 218320a
%changelog
91824b7
%autochangelog