pydantic: fix build failure on Python 3.9
Pydantic tests require additional dependency on old versions of Python to parse new `x | y` syntax. See build logs: https://gist.github.com/PerchunPak/74aaed48223155f22e43dcef493d7c7b
This commit is contained in:
parent
bf6c95a420
commit
9ba392312c
|
@ -23,6 +23,7 @@
|
||||||
, faker
|
, faker
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pytest-mock
|
, pytest-mock
|
||||||
|
, eval-type-backport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -45,7 +46,7 @@ buildPythonPackage rec {
|
||||||
name = "fix-pytest8-compatibility.patch";
|
name = "fix-pytest8-compatibility.patch";
|
||||||
url = "https://github.com/pydantic/pydantic/commit/825a6920e177a3b65836c13c7f37d82b810ce482.patch";
|
url = "https://github.com/pydantic/pydantic/commit/825a6920e177a3b65836c13c7f37d82b810ce482.patch";
|
||||||
hash = "sha256-Dap5DtDzHw0jS/QUo5CRI9sLDJ719GRyC4ZNDWEdzus=";
|
hash = "sha256-Dap5DtDzHw0jS/QUo5CRI9sLDJ719GRyC4ZNDWEdzus=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optionals (pythonOlder "3.9") [
|
buildInputs = lib.optionals (pythonOlder "3.9") [
|
||||||
|
@ -69,13 +70,16 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs =
|
||||||
cloudpickle
|
[
|
||||||
dirty-equals
|
cloudpickle
|
||||||
faker
|
dirty-equals
|
||||||
pytest-mock
|
faker
|
||||||
pytestCheckHook
|
pytest-mock
|
||||||
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
pytestCheckHook
|
||||||
|
]
|
||||||
|
++ lib.flatten (lib.attrValues passthru.optional-dependencies)
|
||||||
|
++ lib.optionals (pythonOlder "3.10") [ eval-type-backport ];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user