From 102626373ec18f1928f53a2c12daf31acec23592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 8 Oct 2019 13:01:08 +0200 Subject: [PATCH] Move a verbose line of %pyproject_buildrequires from stdout to stderr The `rm -v` command prints the output to stderr, polluting the generated buildrequires $ rm -rfv pytest_harvest.dist-info/ removed 'pytest_harvest.dist-info/METADATA' removed 'pytest_harvest.dist-info/LICENSE' removed 'pytest_harvest.dist-info/top_level.txt' removed 'pytest_harvest.dist-info/entry_points.txt' removed directory 'pytest_harvest.dist-info/' This can lead to RPM errors: error: Dependency tokens must begin with alpha-numeric, '_' or '/': 'pytest_harvest.dist-info/METADATA' Or bogus dependencies -- the SRPM requires "removed" and "directory". See https://github.com/rpm-software-management/rpm/pull/889 --- macros.pyproject | 2 +- pyproject-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros.pyproject b/macros.pyproject index c826123..3a35ad7 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -26,7 +26,7 @@ echo 'python3-devel' echo 'python3dist(packaging)' echo 'python3dist(pytoml)' # setuptools assumes no pre-existing dist-info -rm -rfv *.dist-info/ +rm -rfv *.dist-info/ >&2 if [ -f %{__python3} ]; then RPM_TOXENV="%{toxenv}" %{__python3} -I %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?**} fi diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 0e64447..ed98183 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -6,7 +6,7 @@ License: MIT # Keep the version at zero and increment only release Version: 0 -Release: 6%{?dist} +Release: 7%{?dist} Source0: macros.pyproject Source1: pyproject_buildrequires.py @@ -87,6 +87,9 @@ install -m 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/ %license LICENSE %changelog +* Tue Oct 08 2019 Miro HronĨok - 0-7 +- Move a verbose line of %%pyproject_buildrequires from stdout to stderr + * Fri Jul 26 2019 Petr Viktorin - 0-6 - Use importlib_metadata rather than pip freeze