Accepting request 1061099 from home:badshah400:branches:devel:languages:python:numeric

A plugin to fake subprocess for pytest that will be needed by python-awkward's and friends' updates.

OBS-URL: https://build.opensuse.org/request/show/1061099
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-subprocess?expand=0&rev=1
This commit is contained in:
2023-01-26 14:02:42 +00:00
committed by Git OBS Bridge
commit b542935b6c
7 changed files with 135 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

16
_service Normal file
View File

@@ -0,0 +1,16 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/aklajnert/pytest-subprocess</param>
<param name="revision">1.4.2</param>
<param name="subdir">tests</param>
<param name="filename">tests</param>
<param name="version">_none_</param>
</service>
<service name="recompress" mode="disabled">
<param name="compression">xz</param>
<param name="file">tests.tar</param>
</service>
<service name="download_files" mode="disabled" />
</services>

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3edccde14da6f65860d55891df37a1ec86fcf83db880512f856a77cfb521d1e1
size 24835

View File

@@ -0,0 +1,6 @@
-------------------------------------------------------------------
Wed Jan 25 09:15:32 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Initial package.
- Include tests.tar.xz via _service: pulls in tests from github as
these are not bundled in original source tarball.

View File

@@ -0,0 +1,83 @@
#
# spec file for package python-pytest-subprocess
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname pytest_subprocess
Name: python-pytest-subprocess
Version: 1.4.2
Release: 0
Summary: A plugin to fake subprocess for pytest
License: MIT
URL: https://github.com/aklajnert/pytest-subprocess
Source0: https://files.pythonhosted.org/packages/source/p/pytest-subprocess/pytest-subprocess-%{version}.tar.gz
Source1: tests.tar.xz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 4.0.0
Recommends: python-Pygments >= 2.0
Recommends: python-anyio
Recommends: python-changelogd
Recommends: python-coverage
Recommends: python-docutils >= 0.12
Recommends: python-furo
Recommends: python-nox
Recommends: python-pytest-asyncio >= 0.15.1
Recommends: python-pytest-rerunfailures
Recommends: python-sphinx
Recommends: python-sphinx-autodoc-typehints
Recommends: python-sphinxcontrib-napoleon
BuildArch: noarch
# SECTION Test requirements
BuildRequires: %{python_module anyio}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module pygments}
BuildRequires: %{python_module pytest}
# /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
%setup -q -n pytest-subprocess-%{version}
%setup -q -D -T -a 1 -n pytest-subprocess-%{version}
chmod -x LICENSE README.rst pytest_subprocess/py.typed pytest_subprocess.egg-info/*
sed -Ei "s/\r$//" README.rst
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Docs dir is missing from tarball
%pytest -k "not test_documentation"
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
%changelog

BIN
tests.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.