depot/third_party/nixpkgs/pkgs/development/python-modules/marshmallow-dataclass/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

59 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, marshmallow
, marshmallow-enum
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, typeguard
, typing-inspect
}:
buildPythonPackage rec {
pname = "marshmallow-dataclass";
version = "8.5.3";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "lovasoa";
repo = "marshmallow_dataclass";
rev = "v${version}";
sha256 = "0mngkjfs2nxxr0y77n429hb22rmjxbnn95j4vwqr9y6q16bqxs0w";
};
propagatedBuildInputs = [
marshmallow
typing-inspect
];
checkInputs = [
marshmallow-enum
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";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}