python311Packages.munch: refactor, enable tests

and stop propagating pbr.
This commit is contained in:
Martin Weinelt
2024-01-10 21:30:20 +01:00
parent 769e5f5d37
commit c2f24040dc
@@ -1,24 +1,39 @@
{ lib
, buildPythonPackage
, fetchPypi
, six
, fetchFromGitHub
# build-system
, pbr
, setuptools
# tests
, pytestCheckHook
, pyyaml
}:
buildPythonPackage rec {
pname = "munch";
version = "4.0.0";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-VCyxUUYSYyFqTjfD/Zr8Ql/urziqowJc0qmB+ttCIjU=";
src = fetchFromGitHub {
owner = "Infinidat";
repo = "munch";
rev = "refs/tags/${version}";
hash = "sha256-p7DvOGRhkCmtJ32EfttyKXGGmO5kfb2bQGqok/RJtU8=";
};
propagatedBuildInputs = [ six pbr ];
env.PBR_VERSION = version;
# No tests in archive
doCheck = false;
nativeBuildInputs = [
pbr
setuptools
];
nativeCheckInputs = [
pytestCheckHook
pyyaml
];
meta = with lib; {
description = "A dot-accessible dictionary (a la JavaScript objects)";