mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
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
|
, 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)
|
||||||
|
|
|
@ -3891,6 +3891,8 @@ self: super: with self; {
|
||||||
|
|
||||||
eufylife-ble-client = callPackage ../development/python-modules/eufylife-ble-client { };
|
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 { };
|
evaluate = callPackage ../development/python-modules/evaluate { };
|
||||||
|
|
||||||
evdev = callPackage ../development/python-modules/evdev { };
|
evdev = callPackage ../development/python-modules/evdev { };
|
||||||
|
|
Loading…
Reference in a new issue