Sync from SUSE:SLFO:Main python-subprocess-tee revision c29d5e3a312362661d64509b7e557f04
This commit is contained in:
commit
de191fd758
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
@ -0,0 +1,43 @@
|
|||||||
|
From 8dcde7134573acb506c7f34746573cbaeccf9b4d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
Date: Fri, 5 May 2023 20:11:37 +0200
|
||||||
|
Subject: [PATCH] test/test_unit.py: do not use python3, rather use
|
||||||
|
sys.executable to use the same python version this test is running with
|
||||||
|
|
||||||
|
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
---
|
||||||
|
test/test_unit.py | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_unit.py b/test/test_unit.py
|
||||||
|
index 1dd4d2f..652fce9 100644
|
||||||
|
--- a/test/test_unit.py
|
||||||
|
+++ b/test/test_unit.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
"""Unittests."""
|
||||||
|
import subprocess
|
||||||
|
+import sys
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
@@ -30,7 +31,7 @@ def test_run_list() -> None:
|
||||||
|
# NOTICE: subprocess.run() does fail to capture any output when cmd is
|
||||||
|
# a list and you specific shell=True. Still, when not mentioning shell,
|
||||||
|
# it does work.
|
||||||
|
- cmd = ["python3", "--version"]
|
||||||
|
+ cmd = [sys.executable, "--version"]
|
||||||
|
old_result = subprocess.run(
|
||||||
|
cmd,
|
||||||
|
# shell=True,
|
||||||
|
@@ -47,7 +48,7 @@ def test_run_list() -> None:
|
||||||
|
|
||||||
|
def test_run_echo(capsys: CaptureFixture[str]) -> None:
|
||||||
|
"""Validate run call with echo dumps command."""
|
||||||
|
- cmd = ["python3", "--version"]
|
||||||
|
+ cmd = [sys.executable, "--version"]
|
||||||
|
old_result = subprocess.run(
|
||||||
|
cmd,
|
||||||
|
# shell=True,
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
68
python-subprocess-tee.changes
Normal file
68
python-subprocess-tee.changes
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 17 07:05:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Remove BuildRequires on setuptools_scm_git_archive.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 5 18:13:11 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- add patch
|
||||||
|
0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch
|
||||||
|
to replace hardcoded python3 executable name
|
||||||
|
(see https://github.com/pycontribs/subprocess-tee/pull/107)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 5 10:39:38 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Feb 12 08:03:02 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- BuildRequire rich, otherwise the %checks fail on SLES15 with
|
||||||
|
the python3-module (rich is not being installed automatically)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 31 15:15:06 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- update to 0.4.1:
|
||||||
|
* Bugfixes
|
||||||
|
- Correct trove metadata related to supported platforms (#90) @ssbarnea
|
||||||
|
- Move mypy config to pyproject.toml (#88) @ssbarnea
|
||||||
|
- Stop using deprecated get_event_loop() (#86) @gotmax23
|
||||||
|
- Configure packit (#81) @ssbarnea
|
||||||
|
- Add "setuptools >= 61.0" to build system requires (#82) @gotmax23
|
||||||
|
- Clear build dependencies (#80) @ssbarnea
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 7 22:28:03 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
|
- Update to version 0.4.0:
|
||||||
|
* Minor Changes
|
||||||
|
- Enable support for py311 (#72) @ssbarnea
|
||||||
|
* Bugfixes
|
||||||
|
- Remove support for py37 (#70) @ssbarnea
|
||||||
|
- Remove support for py36 (#65) @ssbarnea
|
||||||
|
- Mark test test_rich_console_ex as broken (#64) @ssbarnea
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 11 08:51:09 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||||
|
|
||||||
|
- Temporarily disable the failing test test_rich_console_ex to prevent a build fail
|
||||||
|
reported upstream: https://github.com/pycontribs/subprocess-tee/issues/58
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 31 09:15:47 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Still missing BR: setuptools_scm_git_archive
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 31 07:50:38 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||||
|
|
||||||
|
- remove dependency generator, as it is not adviced to do so
|
||||||
|
- add setuptools_scm as dependency to fix the version number
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 15 20:31:36 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||||
|
|
||||||
|
- Initial package for version 0.3.5.
|
72
python-subprocess-tee.spec
Normal file
72
python-subprocess-tee.spec
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-subprocess-tee
|
||||||
|
#
|
||||||
|
# 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-subprocess-tee
|
||||||
|
Version: 0.4.1
|
||||||
|
Release: 0
|
||||||
|
Summary: Captures the output of subprocesses in real-time
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/pycontribs/subprocess-tee
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/s/subprocess-tee/subprocess-tee-%{version}.tar.gz
|
||||||
|
Patch1: 0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module rich}
|
||||||
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
# SECTION test
|
||||||
|
BuildRequires: %{python_module enrich}
|
||||||
|
# /SECTION
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides a drop-in alternative to `subprocess.run` that
|
||||||
|
captures the output while still printing it in real-time, just the way
|
||||||
|
`tee` does.
|
||||||
|
|
||||||
|
Printing output in real-time while still capturing is valuable for
|
||||||
|
any tool that executes long-running child processes. For those, you do want
|
||||||
|
to provide instant feedback (progress) related to what is happening.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n subprocess-tee-%{version}
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
# program "molecule" is no available in openSUSE. But this test is platform-independent, so not required
|
||||||
|
%pytest -k 'not test_molecule and not test_rich_console_ex'
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%{python_sitelib}/subprocess_tee/
|
||||||
|
%{python_sitelib}/subprocess_tee-%{version}*-info
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE
|
||||||
|
|
||||||
|
%changelog
|
BIN
subprocess-tee-0.4.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
subprocess-tee-0.4.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user