forked from pool/python-starlette
* Use `ParamSpec` for `run_in_threadpool` #2375. * Add `UploadFile.__repr__` #2360. * Merge URLs properly on `TestClient` #2376. * Take weak ETags in consideration on `StaticFiles` #2334. * Deprecate `FileResponse(method=...)` parameter #2366. * Add `middleware` per `Route`/`WebSocketRoute` #2349. * Add `middleware` per `Router` #2351. * Do not overwrite `"path"` and `"root_path"` scope keys #2352. * Set `ensure_ascii=False` on `json.dumps()` for `WebSocket.send_json()` #2341. - update to 0.32.0.post1: * Revert mkdocs-material from 9.1.17 to 9.4.7 #2326. - update to 0.32.0: * Send `reason` on `WebSocketDisconnect` #2309. * Add `domain` parameter to `SessionMiddleware` #2280. * Inherit from `HTMLResponse` instead of `Response` on `_TemplateResponse` #2274. * Restore the `Response.render` type annotation to its pre-0.31.0 state #2264. - Deprecate on_startup and on_shutdown events #2070. - Limit the number of fields and files when parsing - Fix test package by adding 'exceptiongroup' python module as a - Remove unneeded BuildRequires on contextlib2. * Host now ignores port on routing #1322. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-starlette?expand=0&rev=44
107 lines
3.2 KiB
RPMSpec
107 lines
3.2 KiB
RPMSpec
#
|
|
# spec file
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without test
|
|
%else
|
|
%define psuffix %{nil}
|
|
%bcond_with test
|
|
%endif
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-starlette%{psuffix}
|
|
Version: 0.34.0
|
|
Release: 0
|
|
Summary: Lightweight ASGI framework/toolkit
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/encode/starlette
|
|
Source: https://github.com/encode/starlette/archive/refs/tags/%{version}.tar.gz#/starlette-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.7}
|
|
BuildRequires: %{python_module hatchling}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-anyio >= 3.4.0
|
|
Requires: (python-typing_extensions >= 3.10.0 if python-base < 3.10)
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module anyio >= 3.4.0}
|
|
# typing_extensions, see below
|
|
# SECTION [full]
|
|
BuildRequires: %{python_module PyYAML}
|
|
BuildRequires: %{python_module Jinja2}
|
|
BuildRequires: %{python_module httpx >= 0.22}
|
|
BuildRequires: %{python_module itsdangerous}
|
|
BuildRequires: %{python_module python-multipart}
|
|
# /SECTION
|
|
# SECTION test
|
|
BuildRequires: %{python_module exceptiongroup}
|
|
BuildRequires: %{python_module pytest-asyncio}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module trio}
|
|
# testing requires it for all flavors
|
|
BuildRequires: %{python_module typing_extensions}
|
|
BuildRequires: %{python_module importlib-metadata}
|
|
# /SECITON
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Starlette is a lightweight ASGI framework/toolkit, which is ideal for
|
|
building high performance asyncio services.
|
|
|
|
%prep
|
|
%autosetup -n starlette-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
# override default pytest.ini configuration in pyproject.toml to do
|
|
# not crash on deprecation warning
|
|
touch pytest.ini
|
|
|
|
%install
|
|
%if ! %{with test}
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%endif
|
|
|
|
%check
|
|
%if %{with test}
|
|
# The following tests don't work in some archs because time_t cannot
|
|
# hold the values the test expect, as they go beyond the maximum
|
|
# value in i586 and armv7l. As we are using Buildarch: noarch, we
|
|
# cannot just use ifarch conditionals here...
|
|
ignored_tests="test_set_cookie"
|
|
ignored_tests="$ignored_tests or test_expires_on_set_cookie"
|
|
%pytest --asyncio-mode=strict -k "not ($ignored_tests)"
|
|
|
|
%endif
|
|
|
|
%if ! %{with test}
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE.md
|
|
%{python_sitelib}/starlette
|
|
%{python_sitelib}/starlette-%{version}*-info
|
|
%endif
|
|
|
|
%changelog
|