|
 |
6ef18fb |
Name: python-starlette
|
|
 |
109f568 |
Version: 0.18.0
|
|
 |
c4cc407 |
Release: %autorelease
|
|
 |
2c00c02 |
Summary: The little ASGI library that shines
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
License: BSD
|
|
 |
ab03043 |
URL: https://www.starlette.io/
|
|
 |
6ef18fb |
Source0: https://github.com/encode/starlette/archive/%{version}/starlette-%{version}.tar.gz
|
|
 |
2c00c02 |
BuildArch: noarch
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
BuildRequires: python3-devel
|
|
 |
ab03043 |
|
|
 |
98b0578 |
Obsoletes: python-starlette-doc < 0.16.0-10
|
|
 |
2c00c02 |
|
|
 |
ab03043 |
%global common_description %{expand:
|
|
 |
ab03043 |
Starlette is a lightweight ASGI framework/toolkit, which is ideal for building
|
|
 |
7c0c188 |
high performance async services.
|
|
 |
ab03043 |
|
|
 |
ab03043 |
It is production-ready, and gives you the following:
|
|
 |
ab03043 |
|
|
 |
7c0c188 |
• Seriously impressive performance.
|
|
 |
7c0c188 |
• WebSocket support.
|
|
 |
7c0c188 |
• In-process background tasks.
|
|
 |
7c0c188 |
• Startup and shutdown events.
|
|
 |
7c0c188 |
• Test client built on requests.
|
|
 |
7c0c188 |
• CORS, GZip, Static Files, Streaming responses.
|
|
 |
7c0c188 |
• Session and Cookie support.
|
|
 |
0a0b2ac |
• 100%% test coverage.
|
|
 |
0a0b2ac |
• 100%% type annotated codebase.
|
|
 |
7c0c188 |
• Few hard dependencies.
|
|
 |
7c0c188 |
• Compatible with asyncio and trio backends.}
|
|
 |
ab03043 |
|
|
 |
ab03043 |
%description %{common_description}
|
|
 |
ab03043 |
|
|
 |
ab03043 |
|
|
 |
6ef18fb |
%pyproject_extras_subpkg -n python3-starlette full
|
|
 |
ab03043 |
|
|
 |
ab03043 |
|
|
 |
6ef18fb |
%package -n python3-starlette
|
|
 |
2c00c02 |
Summary: %{summary}
|
|
 |
2c00c02 |
|
|
 |
6ef18fb |
%description -n python3-starlette %{common_description}
|
|
 |
ab03043 |
|
|
 |
ab03043 |
|
|
 |
2c00c02 |
%prep
|
|
 |
6ef18fb |
%autosetup -n starlette-%{version}
|
|
 |
109f568 |
|
|
 |
ab03043 |
# Remove Gitter chat app from documentation; it relies on pre-compiled/minified
|
|
 |
98b0578 |
# JavaScript, which is not acceptable in Fedora. Since we are not building
|
|
 |
98b0578 |
# documentation, we do this very bluntly:
|
|
 |
98b0578 |
rm -vrf docs/js
|
|
 |
ab03043 |
|
|
 |
109f568 |
# Produce a filtered version of requirements.txt, which contains testing
|
|
 |
109f568 |
# dependencies.
|
|
 |
109f568 |
#
|
|
 |
109f568 |
# We do not need the “Optionals”, which correspond to the “full” extra we are
|
|
 |
109f568 |
# already BR’ing; those for “Packaging”, which are for uploading to PyPI; or
|
|
 |
109f568 |
# those for “Documentation”, so long as we are not able to build and package
|
|
 |
109f568 |
# it; but we do need those for “Testing”, except linters, formatters, coverage
|
|
 |
109f568 |
# analysis, and mypy-related dependencies.
|
|
 |
109f568 |
#
|
|
 |
109f568 |
# Loosen exact-version dependencies.
|
|
 |
109f568 |
awk '
|
|
 |
109f568 |
!NF { next }
|
|
 |
109f568 |
$1 == "#" {
|
|
 |
109f568 |
o = $2 !~ /^(Optionals|Documentation|Packaging)$/
|
|
 |
109f568 |
next
|
|
 |
109f568 |
}
|
|
 |
109f568 |
o {
|
|
 |
109f568 |
if ($1 ~ /^(black|coverage|(auto)?flake8?|isort|mypy|types-)/) { next }
|
|
 |
109f568 |
print $0
|
|
 |
109f568 |
}
|
|
 |
109f568 |
' requirements.txt | sed -r 's/==/>=/' | tee requirements-filtered.txt
|
|
 |
109f568 |
|
|
 |
2c00c02 |
|
|
 |
ae71f15 |
%generate_buildrequires
|
|
 |
109f568 |
%pyproject_buildrequires -x full requirements-filtered.txt
|
|
 |
ae71f15 |
|
|
 |
ae71f15 |
|
|
 |
2c00c02 |
%build
|
|
 |
ab03043 |
%pyproject_wheel
|
|
 |
ab03043 |
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
%install
|
|
 |
ab03043 |
%pyproject_install
|
|
 |
6ef18fb |
%pyproject_save_files starlette
|
|
 |
ab03043 |
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
%check
|
|
 |
2c00c02 |
%pytest
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
|
|
 |
6ef18fb |
%files -n python3-starlette -f %{pyproject_files}
|
|
 |
98b0578 |
%doc README.md
|
|
 |
ab03043 |
|
|
 |
2c00c02 |
|
|
 |
2c00c02 |
%changelog
|
|
 |
c4cc407 |
%autochangelog
|