diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index ed98183..f21f481 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: 7%{?dist} +Release: 8%{?dist} Source0: macros.pyproject Source1: pyproject_buildrequires.py @@ -87,6 +87,9 @@ install -m 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/ %license LICENSE %changelog +* Fri Oct 25 2019 Miro Hrončok - 0-8 +- When tox fails, print tox output before failing + * Tue Oct 08 2019 Miro Hrončok - 0-7 - Move a verbose line of %%pyproject_buildrequires from stdout to stderr diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index cbe5be9..e11c3d8 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -183,13 +183,14 @@ def generate_tox_requirements(toxenv, requirements): with tempfile.NamedTemporaryFile('r') as depfile: r = subprocess.run( ['tox', '--print-deps-to-file', depfile.name, '-qre', toxenv], - check=True, + check=False, encoding='utf-8', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, ) if r.stdout: - print_err(r.stdout) + print_err(r.stdout, end='') + r.check_returncode() requirements.extend(depfile.read().splitlines(), source=f'tox --print-deps-only: {toxenv}')