forked from pool/python-pytest-subprocess
* #171, #178: Allow to access keyword arguments passed to Popen. * #180: Fixed an incorrect wait timeout calculation. * #170: Wrapped ProcessDispatcher.dispatch into FakePopenWrapper as it was causing TypeError when Popen is used as a type. * #169: Get rid of using thread in AsyncFakePopen as it causes thread.join() to hang indefinitely. * #162: Include tests (and docs) and sdist correctly, and stop installing them to site-packages. * #163: Add support for Python 3.12. * #160: Changed pytest entrypoint to avoid error while loading plugin with -p argument. * #128: Add tests directory to sdist. - switch to gh tarball, which includes the tests handled out of tree before - add py314-fix-tests.patch to fix tests with python 3.14 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-subprocess?expand=0&rev=10
75 lines
2.6 KiB
RPMSpec
75 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package python-pytest-subprocess
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-pytest-subprocess
|
|
Version: 1.5.3
|
|
Release: 0
|
|
Summary: A plugin to fake subprocess for pytest
|
|
License: MIT
|
|
URL: https://github.com/aklajnert/pytest-subprocess
|
|
Source0: https://github.com/aklajnert/pytest-subprocess/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}-gh.tar.gz
|
|
Patch1: https://github.com/aklajnert/pytest-subprocess/commit/be30d9a94ba45afb600717e3fcd95b8b2ff2c60e.patch#/py314-fix-tests.patch
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-pytest >= 4.0.0
|
|
BuildArch: noarch
|
|
# SECTION Test requirements
|
|
BuildRequires: %{python_module anyio}
|
|
BuildRequires: %{python_module Pygments >= 2}
|
|
BuildRequires: %{python_module docutils >= 0.12}
|
|
BuildRequires: %{python_module pytest >= 4}
|
|
BuildRequires: %{python_module pytest-asyncio >= 0.15.1}
|
|
BuildRequires: %{python_module pytest-rerunfailures}
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
A pytest plugin to fake subprocess for pytest. The plugin adds the
|
|
``fake_process`` fixture (and ``fp`` as an alias). It can be used it to
|
|
register subprocess results so you won't need to rely on the real processes.
|
|
|
|
%prep
|
|
%autosetup -p1 -n pytest-subprocess-%{version}
|
|
|
|
chmod -x LICENSE README.rst pytest_subprocess/py.typed
|
|
sed -Ei "s/\r$//" README.rst
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
# Docs dir is missing from tarball
|
|
# recursive imports due to building outside git
|
|
%pytest -k "not (test_documentation or test_universal_newlines or test_text)"
|
|
|
|
%files %{python_files}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python_sitelib}/pytest_subprocess/
|
|
%{python_sitelib}/pytest_subprocess-%{version}.dist-info
|
|
|
|
%changelog
|