diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2023-01-03 13:12:46 +0000 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2023-01-06 13:22:51 +0000 |
commit | 61c6a4bcb305cd14cd913fc88ade4b1c0d21eb8c (patch) | |
tree | facadabc3adc2f5426a9eddf578e9d0af11cdf85 /.zuul.yaml | |
parent | 491ce1ab095b122b442de1ce662ebc2e29d27de3 (diff) | |
download | pbr-61c6a4bcb305cd14cd913fc88ade4b1c0d21eb8c.tar.gz |
Tie recursion calls to Dist object, not module
In change I1f2b4d34e587389f7e11b99d000e14477cf5091b, we attempted to
resolve an issue whereby using PBR as a PEP-517 backend could result in
recursion. We did this by setting 'dist.pbr' to 'None' but later
discovered this introduced a regression that prevented us from writing
the 'pbr.json' file into generated sdists. The fix for the regression,
change I407ae88ab8de4b61f94034b3d79a2ca7f7d79d16, stopped setting
'dist.pbr' to 'None' and instead set a global flag to indicate whether
we had already been called or not. Unfortunately it seems this fix is
also insufficent. As discussed in tox#2712 [1], tox v4 has implemented
its own implementation of PEP-517 - 'pyproject-api' [2] - and unlike
'build' this implementation optionally allows re-use of the backend
process for multiple PEP-517 commands. tox's 'Pep517VirtualEnvFrontend'
does just this. This means if we run multiple commands that require
generation of a 'Distribution' object - say,
'prepare_metadata_for_build_wheel' followed by 'build_sdist' - anything
but the first step will not result in proper population of said
'Distribution' objects.
The solution to this issue is simple: per $subject, instead of setting
our recursion-detection canary at the module level, set it at the
Distribution level.
[1] https://github.com/tox-dev/tox/issues/2712
[2] github.com/tox-dev/pyproject-api/
Change-Id: I67909d732a74550fbcd7c06a9e2f4ac88c063444
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to '.zuul.yaml')
0 files changed, 0 insertions, 0 deletions