From 145decb21577af8e6348eb7d60400b0023062c4b6d1536f2355ce8c2a9dcd70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 29 Jul 2022 13:09:57 +0000 Subject: [PATCH] Accepting request 991701 from home:Simmphonie:branches:devel:languages:python - enable multibuild for test OBS-URL: https://build.opensuse.org/request/show/991701 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-starlette?expand=0&rev=14 --- _multibuild | 3 +++ python-starlette.changes | 5 +++++ python-starlette.spec | 34 +++++++++++++++++++++++++--------- 3 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-starlette.changes b/python-starlette.changes index 38b6535..685a2a8 100644 --- a/python-starlette.changes +++ b/python-starlette.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 29 10:21:51 UTC 2022 - Torsten Gruner + +- enable multibuild for test + ------------------------------------------------------------------- Tue Jul 12 17:55:25 UTC 2022 - Michael Ströder diff --git a/python-starlette.spec b/python-starlette.spec index 5564861..013b144 100644 --- a/python-starlette.spec +++ b/python-starlette.spec @@ -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