Open doronbehar opened 1 month ago
The
pythonRelaxDepsHook
has no effect on build time dependencies, such as those specified inbuild-system
. If a package requires incompatible build time dependencies, they should be removed inpostPatch
throughsubstituteInPlace
or similar.
This is a limitation of modifying the metadata of the resulting wheel, where we can only account for runtime dependencies.
The
pythonRelaxDepsHook
has no effect on build time dependencies, such as those specified inbuild-system
. If a package requires incompatible build time dependencies, they should be removed inpostPatch
throughsubstituteInPlace
or similar.This is a limitation of modifying the metadata of the resulting wheel, where we can only account for runtime dependencies.
I read that part, I just thought that it is not trivial to figure out (if you are not a Python developer) that pyproject.toml
may also specify build time dependencies, and hence pythonRelaxDepsHook
won't help with those dependencies.
I was also thinking of perhaps extending it's behavior to also edit pyproject.toml
in a more Nixy way, or to create a new hook just for pyproject.toml
...
Is this intentional? A common anti pattern in Nixpkgs is stuff like this:
Also the docs don't mention the fact that it is actually working on the
METADATA
file and notsetup.{py,cfg}
or any other creative way that dependencies can be specified.