nixpkgs/pkgs/development/python-modules/typical/default.nix

81 lines
1.3 KiB
Nix
Raw Normal View History

2021-10-14 14:12:29 +00:00
{ lib
, buildPythonPackage
, fastjsonschema
2021-10-14 14:12:29 +00:00
, fetchFromGitHub
, future-typing
2021-10-14 14:12:29 +00:00
, inflection
, mypy
2021-10-14 14:12:29 +00:00
, orjson
, pandas
, pendulum
2021-10-14 14:12:29 +00:00
, poetry-core
, pydantic
, pytestCheckHook
, pythonOlder
2021-10-14 14:12:29 +00:00
, sqlalchemy
, typing-extensions
2021-10-14 14:12:29 +00:00
}:
buildPythonPackage rec {
pname = "typical";
version = "2.7.9";
format = "pyproject";
disabled = pythonOlder "3.7";
2021-10-14 14:12:29 +00:00
src = fetchFromGitHub {
owner = "seandstewart";
repo = "typical";
rev = "v${version}";
sha256 = "sha256-ITIsSM92zftnvqLiVGFl//IbBb8N3ffkkqohzOx2JO4=";
};
patches = [
./use-poetry-core.patch
];
nativeBuildInputs = [
poetry-core
];
2021-10-14 14:12:29 +00:00
propagatedBuildInputs = [
inflection
pendulum
fastjsonschema
orjson
future-typing
] ++ lib.optionals (pythonOlder "3.10") [
typing-extensions
2021-10-14 14:12:29 +00:00
];
checkInputs = [
pytestCheckHook
mypy
pydantic
sqlalchemy
pandas
];
disabledTests = [
# We use orjson
"test_ujson"
# ConstraintValueError: Given value <{'key...
"test_tagged_union_validate"
2021-10-14 14:12:29 +00:00
];
disabledTestPaths = [
"benchmark/"
];
pythonImportsCheck = [
"typic"
];
2021-10-14 14:12:29 +00:00
meta = with lib; {
description = "Python library for runtime analysis, inference and validation of Python types";
2021-10-14 14:12:29 +00:00
homepage = "https://python-typical.org/";
license = licenses.mit;
maintainers = with maintainers; [ kfollesdal ];
};
}