diff --git a/.gitignore b/.gitignore index 7693042..2a2c7ef 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /subprocess-tee-0.3.2.tar.gz /subprocess-tee-0.3.4.tar.gz /subprocess-tee-0.3.5.tar.gz +/subprocess-tee-0.4.0.tar.gz diff --git a/0001_ignoring_deprecation_warning_in_pytest.patch b/0001_ignoring_deprecation_warning_in_pytest.patch deleted file mode 100644 index 4ac5f01..0000000 --- a/0001_ignoring_deprecation_warning_in_pytest.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.cfg 2021-09-01 11:24:21.344766241 +0100 -+++ b/setup.cfg 2021-09-01 11:28:38.921259449 +0100 -@@ -74,6 +74,7 @@ - testpaths = src - filterwarnings = - error -+ ignore::DeprecationWarning - - [flake8] - exclude = .venv/,.tox/,dist/,build/,.eggs/ diff --git a/0002_ignoring_molecule_test.patch b/0002_ignoring_molecule_test.patch deleted file mode 100644 index ec8246c..0000000 --- a/0002_ignoring_molecule_test.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/subprocess_tee/test/test_func.py 2021-12-06 15:56:29.727401703 +0100 -+++ b/src/subprocess_tee/test/test_func.py 2021-12-06 15:58:33.464418551 +0100 -@@ -2,14 +2,14 @@ - import subprocess - - --def test_molecule() -> None: -- """Ensures molecule does display output of its subprocesses.""" -- result = subprocess.run( -- ["molecule", "test"], -- stdout=subprocess.PIPE, -- stderr=subprocess.PIPE, -- universal_newlines=True, -- check=False, -- ) # type: ignore -- assert result.returncode == 0 -- assert "Past glories are poor feeding." in result.stdout -+#def test_molecule() -> None: -+# """Ensures molecule does display output of its subprocesses.""" -+# result = subprocess.run( -+# ["molecule", "test"], -+# stdout=subprocess.PIPE, -+# stderr=subprocess.PIPE, -+# universal_newlines=True, -+# check=False, -+# ) # type: ignore -+# assert result.returncode == 0 -+# assert "Past glories are poor feeding." in result.stdout diff --git a/0003_removing_pytest_plus_dependency.patch b/0003_removing_pytest_plus_dependency.patch new file mode 100644 index 0000000..7c0bdcd --- /dev/null +++ b/0003_removing_pytest_plus_dependency.patch @@ -0,0 +1,10 @@ +--- a/pyproject.toml 2022-11-25 10:14:36.878732145 +0100 ++++ b/pyproject.toml 2022-11-25 10:15:20.876127236 +0100 +@@ -54,7 +54,6 @@ + "enrich>=1.2.6", + "molecule>=3.4.0", # ansible is needed but no direct imports are made + "pytest-cov>=2.12.1", +- "pytest-plus>=0.2", + "pytest-xdist>=2.3.0", + "pytest>=6.2.5", + ] diff --git a/python-subprocess-tee.spec b/python-subprocess-tee.spec index 5145b46..c5d03f7 100644 --- a/python-subprocess-tee.spec +++ b/python-subprocess-tee.spec @@ -1,71 +1,54 @@ -%global srcname subprocess-tee -%global pkgname python-subprocess-tee +%global srcname subprocess-tee +%global slugname subprocess_tee %global forgeurl https://github.com/pycontribs/subprocess-tee -%bcond_with tests - -Name: %{pkgname} -Version: 0.3.5 -%forgemeta -Release: %autorelease -Summary: A subprocess.run that works like tee, being able to display output in real time while still capturing it - -URL: %{forgeurl} -Source: %{pypi_source} -License: MIT +%global common_description %{expand: +This package provides an drop-in alternative to subprocess.run that captures +the output while still printing it in real time, just the way tee does. +} -Patch0: 0002_ignoring_molecule_test.patch +%bcond_without tests -BuildArch: noarch +Name: python-%{srcname} +Version: 0.4.0 +%forgemeta +Release: %autorelease +Summary: A subprocess.run that works like tee, being able to display output in real time while still capturing it +URL: %{forgeurl} +Source: %{pypi_source} +License: MIT +Patch0: 0003_removing_pytest_plus_dependency.patch +BuildArch: noarch BuildRequires: python3-devel -BuildRequires: pyproject-rpm-macros - -%if %{with tests} -BuildRequires: python3dist(rich) -BuildRequires: python3dist(enrich) -BuildRequires: python3dist(pytest) -BuildRequires: python3dist(pytest-cov) -BuildRequires: python3dist(pytest-mock) -BuildRequires: python3dist(pytest-xdist) -%endif - -%global common_description %{expand: -This package provides an drop-in alternative to subprocess.run that captures -the output while still printing it in real time, just the way tee does.} %description %{common_description} %package -n python3-%{srcname} Summary: %summary -Requires: python3dist(rich) -Requires: python3dist(enrich) - -%py_provides python3-%{srcname} %description -n python3-%{srcname} %{common_description} %prep -%autosetup -p1 -n %{srcname}-%{version} +%forgeautosetup -p1 %generate_buildrequires -%pyproject_buildrequires -r %{?with_tests:-x testing} +%pyproject_buildrequires -r %{?with_tests:-x test} %build %pyproject_wheel %install %pyproject_install +%pyproject_save_files %{slugname} %if %{with tests} %check -PYTHONPATH=src %{python3} -m pytest -vv src/subprocess_tee/test +%pytest test -k "not test_molecule" %endif -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE -%{python3_sitelib}/subprocess_tee/ -%{python3_sitelib}/subprocess_tee-*.dist-info/ %changelog -%autochangelog \ No newline at end of file +%autochangelog diff --git a/sources b/sources index 35202a3..f83f9e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (subprocess-tee-0.3.5.tar.gz) = 47de075e7b6c75598dac0ad1899e1cce9dc1131b49c35ccade2b67c8d2a2d0248ce22a20c336519ff00bfd57269613bc663012e48cf0afa087c93ee74e18e4d4 +SHA512 (subprocess-tee-0.4.0.tar.gz) = 944f978c87d612a7846709106b7857761288ef9e6923bf0b69e20cc493b7dbcf51c16867ed7b3038a1d2f180108972c35e8d9fe380542b56c7c68320caf9321b