python311Packages.pydantic_1: init at 1.10.3
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, cython
|
||||
, email-validator
|
||||
, fetchFromGitHub
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, python-dotenv
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, typing-extensions
|
||||
, libxcrypt
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pydantic";
|
||||
version = "1.10.13";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pydantic";
|
||||
repo = "pydantic";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ruDVcCLPVuwIkHOjYVuKOoP3hHHr7ItIY55Y6hUgR74=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
cython
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals (pythonOlder "3.9") [
|
||||
libxcrypt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
dotenv = [
|
||||
python-dotenv
|
||||
];
|
||||
email = [
|
||||
email-validator
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||
|
||||
pytestFlagsArray = [
|
||||
# https://github.com/pydantic/pydantic/issues/4817
|
||||
"-W" "ignore::pytest.PytestReturnNotNoneWarning"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
pythonImportsCheck = [ "pydantic" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Data validation and settings management using Python type hinting";
|
||||
homepage = "https://github.com/pydantic/pydantic";
|
||||
changelog = "https://github.com/pydantic/pydantic/blob/v${version}/HISTORY.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ wd15 ];
|
||||
};
|
||||
}
|
||||
@@ -10179,6 +10179,8 @@ self: super: with self; {
|
||||
|
||||
pydantic = callPackage ../development/python-modules/pydantic { };
|
||||
|
||||
pydantic_1 = callPackage ../development/python-modules/pydantic/1.nix { };
|
||||
|
||||
pydantic-core = callPackage ../development/python-modules/pydantic-core { };
|
||||
|
||||
pydantic-extra-types = callPackage ../development/python-modules/pydantic-extra-types { };
|
||||
|
||||
Reference in New Issue
Block a user