2018-03-05 12:44:34 +00:00
|
|
|
#
|
2022-11-30 07:15:50 +00:00
|
|
|
# spec file
|
2018-03-05 12:44:34 +00:00
|
|
|
#
|
2024-01-02 12:15:19 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-03-05 12:44:34 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-13 13:17:41 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-09-11 15:14:57 +00:00
|
|
|
#
|
2018-03-05 12:44:34 +00:00
|
|
|
|
|
|
|
|
2022-07-06 08:00:23 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-24 09:16:43 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-07-06 08:00:23 +00:00
|
|
|
Name: python-pytest-asyncio%{psuffix}
|
2024-01-02 12:15:19 +00:00
|
|
|
Version: 0.23.3
|
2018-03-05 12:44:34 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Pytest support for asyncio
|
2018-09-11 15:14:57 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
URL: https://github.com/pytest-dev/pytest-asyncio
|
2020-06-29 12:40:11 +00:00
|
|
|
Source: https://github.com/pytest-dev/pytest-asyncio/archive/v%{version}.tar.gz#/pytest-asyncio-%{version}.tar.gz
|
2024-01-02 12:15:19 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2022-08-07 06:42:02 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2022-01-20 18:00:47 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2018-03-05 12:44:34 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2022-08-07 06:42:02 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-03-05 12:44:34 +00:00
|
|
|
BuildRequires: fdupes
|
2018-09-11 15:14:57 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2023-05-04 22:37:45 +00:00
|
|
|
Requires: python-pytest >= 7.0.0
|
2022-07-04 18:01:59 +00:00
|
|
|
%if 0%{?python_version_nodots} < 38
|
|
|
|
Requires: python-typing-extensions >= 3.7.2
|
2022-01-20 18:00:47 +00:00
|
|
|
%endif
|
2018-03-05 12:44:34 +00:00
|
|
|
BuildArch: noarch
|
2022-07-06 08:00:23 +00:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module hypothesis >= 5.7.1}
|
2023-05-04 22:37:45 +00:00
|
|
|
BuildRequires: %{python_module pytest >= 7.0.0}
|
2022-07-06 08:00:23 +00:00
|
|
|
BuildRequires: %{python_module pytest-asyncio = %{version}}
|
|
|
|
%endif
|
2018-03-05 12:44:34 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
pytest-asyncio is a Python library used for testing asyncio code with pytest.
|
|
|
|
|
|
|
|
asyncio code is usually written in the form of coroutines, which makes it
|
|
|
|
slightly more difficult to test using normal testing tools. pytest-asyncio
|
|
|
|
provides useful fixtures and markers to make testing easier.
|
|
|
|
|
|
|
|
%prep
|
2023-10-17 08:39:29 +00:00
|
|
|
%autosetup -p1 -n pytest-asyncio-%{version}
|
2018-03-05 12:44:34 +00:00
|
|
|
|
|
|
|
%build
|
2022-01-20 18:00:47 +00:00
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
2022-08-07 06:42:02 +00:00
|
|
|
%pyproject_wheel
|
2018-03-05 12:44:34 +00:00
|
|
|
|
2022-07-06 08:00:23 +00:00
|
|
|
%if !%{with test}
|
2018-03-05 12:44:34 +00:00
|
|
|
%install
|
2022-01-20 18:00:47 +00:00
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
2022-08-07 06:42:02 +00:00
|
|
|
%pyproject_install
|
2018-03-05 12:44:34 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-07-06 08:00:23 +00:00
|
|
|
%endif
|
2018-03-05 12:44:34 +00:00
|
|
|
|
2022-07-06 08:00:23 +00:00
|
|
|
%if %{with test}
|
2018-09-11 15:14:57 +00:00
|
|
|
%check
|
2020-03-09 09:37:30 +00:00
|
|
|
%pytest
|
2022-07-06 08:00:23 +00:00
|
|
|
%endif
|
2018-09-11 15:14:57 +00:00
|
|
|
|
2022-07-06 08:00:23 +00:00
|
|
|
%if !%{with test}
|
2018-03-05 12:44:34 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2022-12-09 11:11:54 +00:00
|
|
|
%{python_sitelib}/pytest_asyncio
|
2024-01-02 12:15:19 +00:00
|
|
|
%{python_sitelib}/pytest_asyncio-%{version}.dist-info
|
2022-07-06 08:00:23 +00:00
|
|
|
%endif
|
2018-03-05 12:44:34 +00:00
|
|
|
|
|
|
|
%changelog
|