depot/third_party/nixpkgs/pkgs/development/python-modules/marshmallow-dataclass/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

57 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
marshmallow,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
typeguard,
typing-inspect,
}:
buildPythonPackage rec {
pname = "marshmallow-dataclass";
version = "8.6.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "lovasoa";
repo = "marshmallow_dataclass";
rev = "refs/tags/v${version}";
hash = "sha256-IHHYYtQrdSAtZxbd/YV9J+c4B23HLr9gr01OE6Tgj94=";
};
propagatedBuildInputs = [
marshmallow
typing-inspect
];
nativeCheckInputs = [
pytestCheckHook
typeguard
];
pytestFlagsArray = [
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
"-W"
"ignore::DeprecationWarning"
];
disabledTests = lib.optionals (pythonAtLeast "3.10") [
# TypeError: UserId is not a dataclass and cannot be turned into one.
"test_newtype"
];
pythonImportsCheck = [ "marshmallow_dataclass" ];
meta = with lib; {
description = "Automatic generation of marshmallow schemas from dataclasses";
homepage = "https://github.com/lovasoa/marshmallow_dataclass";
changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}