From f6de6f1f7cd00232fe0c4709c42f778695943719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 5 Jan 2024 10:09:25 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-subprocess-tee revision c29d5e3a312362661d64509b7e557f04 --- .gitattributes | 23 ++++++ ...y-do-not-use-python3-rather-use-sys..patch | 43 +++++++++++ python-subprocess-tee.changes | 68 ++++++++++++++++++ python-subprocess-tee.spec | 72 +++++++++++++++++++ subprocess-tee-0.4.1.tar.gz | 3 + 5 files changed, 209 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch create mode 100644 python-subprocess-tee.changes create mode 100644 python-subprocess-tee.spec create mode 100644 subprocess-tee-0.4.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch b/0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch new file mode 100644 index 0000000..414b9ed --- /dev/null +++ b/0001-test-test_unit.py-do-not-use-python3-rather-use-sys..patch @@ -0,0 +1,43 @@ +From 8dcde7134573acb506c7f34746573cbaeccf9b4d Mon Sep 17 00:00:00 2001 +From: Johannes Kastl +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 +--- + 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 + diff --git a/python-subprocess-tee.changes b/python-subprocess-tee.changes new file mode 100644 index 0000000..91839ba --- /dev/null +++ b/python-subprocess-tee.changes @@ -0,0 +1,68 @@ +------------------------------------------------------------------- +Mon Jul 17 07:05:58 UTC 2023 - Steve Kowalik + +- Remove BuildRequires on setuptools_scm_git_archive. + +------------------------------------------------------------------- +Fri May 5 18:13:11 UTC 2023 - Johannes Kastl + +- 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 + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Sun Feb 12 08:03:02 UTC 2023 - Johannes Kastl + +- 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 + +- 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 + +- 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 + +- 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 + +- Still missing BR: setuptools_scm_git_archive + +------------------------------------------------------------------- +Thu Mar 31 07:50:38 UTC 2022 - Sebastian Wagner + +- 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 + +- Initial package for version 0.3.5. diff --git a/python-subprocess-tee.spec b/python-subprocess-tee.spec new file mode 100644 index 0000000..2ef8f92 --- /dev/null +++ b/python-subprocess-tee.spec @@ -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 diff --git a/subprocess-tee-0.4.1.tar.gz b/subprocess-tee-0.4.1.tar.gz new file mode 100644 index 0000000..cfd8aa9 --- /dev/null +++ b/subprocess-tee-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3c124993f8b88d1eb1c2fde0bc2069787eac720ba88771cba17e8c93324825d +size 13599