python3Packages.buildPythonPackage: add internal helper getFinalPassthru
Add getFinalPassthru, an internal helper function that produces informative error message when an atttribute is not found in `finalAttrs.passthru`.
This commit is contained in:
@@ -204,6 +204,20 @@ let
|
||||
self = stdenv.mkDerivation (
|
||||
finalAttrs:
|
||||
let
|
||||
getFinalPassthru =
|
||||
let
|
||||
pos = unsafeGetAttrPos "passthru" finalAttrs;
|
||||
in
|
||||
attrName:
|
||||
finalAttrs.passthru.${attrName} or (throw (
|
||||
''
|
||||
${finalAttrs.name}: passthru.${attrName} missing after overrideAttrs overriding.
|
||||
''
|
||||
+ optionalString (pos != null) ''
|
||||
Last overridden at ${pos.file}:${toString pos.line}
|
||||
''
|
||||
));
|
||||
|
||||
format' =
|
||||
assert (pyproject != null) -> (format == null);
|
||||
if pyproject != null then
|
||||
|
||||
Reference in New Issue
Block a user