python311Packages.mashumaro: refactor
This commit is contained in:
parent
faef749c0e
commit
8c7245f5b9
1 changed files with 29 additions and 18 deletions
|
@ -1,29 +1,30 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, typing-extensions
|
||||
, orjson
|
||||
, msgpack
|
||||
, pyyaml
|
||||
, tomli-w
|
||||
, tomli
|
||||
, pytestCheckHook
|
||||
, ciso8601
|
||||
, fetchFromGitHub
|
||||
, msgpack
|
||||
, orjson
|
||||
, pendulum
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
, setuptools
|
||||
, tomli
|
||||
, tomli-w
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mashumaro";
|
||||
version = "3.10";
|
||||
format = "pyproject";
|
||||
disabled = pythonOlder "3.7";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Fatal1ty";
|
||||
repo = pname;
|
||||
repo = "mashumaro";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-PvMEwIxurDGwYMCmNFThedxDY4vwATHYwMlXkucNuwM=";
|
||||
};
|
||||
|
@ -37,10 +38,20 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
orjson = [ orjson ];
|
||||
msgpack = [ msgpack ];
|
||||
yaml = [ pyyaml ];
|
||||
toml = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
||||
orjson = [
|
||||
orjson
|
||||
];
|
||||
msgpack = [
|
||||
msgpack
|
||||
];
|
||||
yaml = [
|
||||
pyyaml
|
||||
];
|
||||
toml = [
|
||||
tomli-w
|
||||
] ++ lib.optionals (pythonOlder "3.11") [
|
||||
tomli
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
@ -55,7 +66,7 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast and well tested serialization library on top of dataclasses";
|
||||
description = "Serialization library on top of dataclasses";
|
||||
homepage = "https://github.com/Fatal1ty/mashumaro";
|
||||
changelog = "https://github.com/Fatal1ty/mashumaro/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
|
|
Loading…
Reference in a new issue