python3Packages.draccus: fix build with python 3.14

This commit is contained in:
Harinn
2026-05-17 20:12:50 +07:00
parent a049850e8e
commit 5d8782b399
@@ -39,6 +39,13 @@ buildPythonPackage rec {
})
];
# Pass non-callable type= (typing.Union, X | Y) through argparse.
postPatch = ''
substituteInPlace draccus/wrappers/field_wrapper.py \
--replace-fail '_arg_options["type"] = tpe' \
'_arg_options["type"] = tpe if callable(tpe) else str'
'';
build-system = [
setuptools
];