python310Packages.dataclass-factory: init at 2.13

https://github.com/reagento/dataclass-factory
This commit is contained in:
figsoda 2023-09-03 09:42:33 -04:00
parent 5afe4f2ff0
commit ed12decbeb
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, nose2
, typing-extensions
}:
buildPythonPackage rec {
pname = "dataclass-factory";
version = "2.13";
format = "setuptools";
src = fetchFromGitHub {
owner = "reagento";
repo = "dataclass-factory";
rev = version;
hash = "sha256-hNPuqs3TvDleIxflCW5rutbXjDotFRLCNJlcTBFxFAw=";
};
nativeCheckInputs = [
nose2
];
checkInputs = [
typing-extensions
];
pythonImportsCheck = [ "dataclass_factory" ];
checkPhase = ''
runHook preCheck
nose2 -v tests
runHook postCheck
'';
meta = with lib; {
description = "Modern way to convert python dataclasses or other objects to and from more common types like dicts or json-like structures";
homepage = "https://github.com/reagento/dataclass-factory";
changelog = "https://github.com/reagento/dataclass-factory/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@ -2475,6 +2475,8 @@ self: super: with self; {
databricks-sql-connector = callPackage ../development/python-modules/databricks-sql-connector { };
dataclass-factory = callPackage ../development/python-modules/dataclass-factory { };
dataclass-wizard = callPackage ../development/python-modules/dataclass-wizard { };
dataclasses-json = callPackage ../development/python-modules/dataclasses-json { };