Open befeleme opened 2 years ago
I think it would be best if we implemented this in pyproject-rpm-macros as a new %pyproject_buildrequires
flag to exclude certain dependencies. Then, we could easily work that into the the specfile template. I'm not sure how else we could (reasonably) handle this.
FWIW the fact that %pyproject_buildrequires
does not have this ability is (a controversial) worldview of the authors. The idea is that the tool exists solely to transform metadata from upstream to a form that RPM understands. If the metadata is not applicable, it needs to be patched (or sedded), as we do with code. This is basically a "metadata as code" approach. We don't do %autosetup -p1 -X replace_something_in_the_code
and we don't do %pyproject_buildrequires -X remove_unwanted_dependnecy_foo
.
In that case, I don't see any way to solve this (i.e. generate sed invocations or patches to edit the metadata) in a clean, buildsystem agnostic way. I guess this just isn't something pyp2spec should get into, unless there's some other solution that I'm missing.
These may be linters, coverage or dependencies that are not yet packaged in Fedora. There may be versions we don't want to have strictly pinned.
There should be a way to remove them from the source code.