Hello,
So I've used %pyproject_patch_dependency in a specfile that packages two Python distribution packages.
It filtered the dependencies from both. Is this expected? Should it gain some finer tuning (--dist-name argument perhaps)?
On 8/24/26 6:59 AM, Miro Hrončok via python-devel wrote:
So I've used %pyproject_patch_dependency in a specfile that packages two Python distribution packages.
It filtered the dependencies from both. Is this expected? Should it gain some finer tuning (--dist-name argument perhaps)?
I think providing options to filter it to only one dist makes sense, but the bigger question is what the default behavior in the case of multiple dists in a single package should be --- and I don't have a good answer for that yet :).
On 28. 08. 26 18:00, Maxwell G via python-devel wrote:
On 8/24/26 6:59 AM, Miro Hrončok via python-devel wrote:
So I've used %pyproject_patch_dependency in a specfile that packages two Python distribution packages.
It filtered the dependencies from both. Is this expected? Should it gain some finer tuning (--dist-name argument perhaps)?
I think providing options to filter it to only one dist makes sense, but the bigger question is what the default behavior in the case of multiple dists in a single package should be --- and I don't have a good answer for that yet :).
It could either fail or filter it from everything (currently it does that).
I think the current behavior makes sense (e.g. for filtering pytest-cov etc.) if documented properly.
On 8/28/26 4:06 PM, Miro Hrončok via python-devel wrote:
It could either fail or filter it from everything (currently it does that).
I think the current behavior makes sense (e.g. for filtering pytest-cov etc.) if documented properly.
It would technically be a behavioral divergence from the other macros if the macro doesn't error out without explicit --dist-name when there are multiple dists present, but I think this is fine as long as it's documented. The current behavior is sensible in most cases (like removing coverage and lint deps, as you mentioned), and I don't think we would easily be able to make %pyproject_patch_dependency directly error out in the presence of multiple dists, since it's used in %prep.
python-devel@lists.fedoraproject.org