poetry2nix/hooks/python-requires-patch-hook.sh
adisbladis 1a79e628b9 Add a hook to rewrite python_requires in setup.py to be PEP440 compliant
Upstream packaging has changed and using wildcards in python_requires is now considered a bug as it's not PEP400 compliant.
Realistically we have to work around this issue as we can't expect every older version to change.

We do this by rewriting the problematic definitions and dropping the
version precision. This works out because 3.9.* is functionally
equivalent to 3.9.
2023-03-23 15:23:57 +13:00

7 lines
213 B
Bash

poetry2nix-python-requires-patch-hook() {
if [ -z "${dontFixupPythonRequires-}" ]; then
@pythonInterpreter@ @patchScript@ @pythonPath@
fi
}
postPatchHooks+=(poetry2nix-python-requires-patch-hook)