Accepting request 991718 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/991718
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-starlette?expand=0&rev=9
This commit is contained in:
Richard Brown 2022-07-29 14:48:26 +00:00 committed by Git OBS Bridge
commit 1549c8f9eb
3 changed files with 33 additions and 9 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jul 29 10:21:51 UTC 2022 - Torsten Gruner <simmphonie@opensuse.org>
- enable multibuild for test
-------------------------------------------------------------------
Tue Jul 12 17:55:25 UTC 2022 - Michael Ströder <michael@stroeder.com>

View File

@ -1,5 +1,5 @@
#
# spec file for package python-starlette
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
@ -16,9 +16,17 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-starlette
Name: python-starlette%{psuffix}
Version: 0.20.4
Release: 0
Summary: Lightweight ASGI framework/toolkit
@ -27,25 +35,27 @@ 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 Jinja2}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module anyio}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module contextlib2}
BuildRequires: %{python_module itsdangerous}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typing_extensions}
%if %{with test}
BuildRequires: %{python_module aiofiles}
BuildRequires: %{python_module aiosqlite}
BuildRequires: %{python_module anyio}
BuildRequires: %{python_module contextlib2}
BuildRequires: %{python_module databases}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module graphene}
BuildRequires: %{python_module itsdangerous}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-multipart}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module trio}
BuildRequires: %{python_module typing_extensions}
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-base >= 3.7
BuildArch: noarch
%python_subpackages
@ -60,20 +70,26 @@ building high performance asyncio services.
%python_build
%install
%if ! %{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
# Remove unrecognized arguments: --strict-config --strict-markers
sed -i "s|--strict-config||" setup.cfg
sed -i "s|--strict-markers||" setup.cfg
sed -i "s| error$||" setup.cfg
%pytest --asyncio-mode=strict
%endif
%if ! %{with test}
%files %{python_files}
%doc README.md
%license LICENSE.md
%{python_sitelib}/starlette
%{python_sitelib}/starlette-%{version}*-info
%endif
%changelog