Merge pull request #299350 from PerchunPak/fix-pydantic-39
pydantic: fix build failure on Python 3.9
This commit is contained in:
commit
273c2dee78
@ -0,0 +1,35 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "eval-type-backport";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alexmojaki";
|
||||
repo = "eval_type_backport";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-EiYJQUnK10lqjyJ89KacbZ+ZZuOmkRQ9bqTFQFN2iMA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Like `typing._eval_type`, but lets older Python versions use newer typing features.";
|
||||
homepage = "https://github.com/alexmojaki/eval_type_backport";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ perchun ];
|
||||
};
|
||||
}
|
@ -23,6 +23,7 @@
|
||||
, faker
|
||||
, pytestCheckHook
|
||||
, pytest-mock
|
||||
, eval-type-backport
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -45,7 +46,7 @@ buildPythonPackage rec {
|
||||
name = "fix-pytest8-compatibility.patch";
|
||||
url = "https://github.com/pydantic/pydantic/commit/825a6920e177a3b65836c13c7f37d82b810ce482.patch";
|
||||
hash = "sha256-Dap5DtDzHw0jS/QUo5CRI9sLDJ719GRyC4ZNDWEdzus=";
|
||||
})
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals (pythonOlder "3.9") [
|
||||
@ -69,13 +70,16 @@ buildPythonPackage rec {
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
cloudpickle
|
||||
dirty-equals
|
||||
faker
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||
nativeCheckInputs =
|
||||
[
|
||||
cloudpickle
|
||||
dirty-equals
|
||||
faker
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
]
|
||||
++ lib.flatten (lib.attrValues passthru.optional-dependencies)
|
||||
++ lib.optionals (pythonOlder "3.10") [ eval-type-backport ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
|
@ -3891,6 +3891,8 @@ self: super: with self; {
|
||||
|
||||
eufylife-ble-client = callPackage ../development/python-modules/eufylife-ble-client { };
|
||||
|
||||
eval-type-backport = callPackage ../development/python-modules/eval-type-backport { };
|
||||
|
||||
evaluate = callPackage ../development/python-modules/evaluate { };
|
||||
|
||||
evdev = callPackage ../development/python-modules/evdev { };
|
||||
|
Loading…
Reference in New Issue
Block a user