depot/third_party/nixpkgs/pkgs/development/python-modules/dacite/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

46 lines
989 B
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "dacite";
version = "1.8.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "konradhalas";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-aQwQHFWaXwTaA6GQgDcWT6ivE9YtWtHCTOtxDi503+M=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--benchmark-autosave --benchmark-json=benchmark.json" ""
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"dacite"
];
disabledTestPaths = [
"tests/performance"
];
meta = with lib; {
description = "Python helper to create data classes from dictionaries";
homepage = "https://github.com/konradhalas/dacite";
changelog = "https://github.com/konradhalas/dacite/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}