Commit cf17eba6 authored by qbisi's avatar qbisi
Browse files

python312Packages.constantdict: init at 2025.1.1

parent 4ab1f1f1
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "constantdict";
  version = "2025.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "matthiasdiener";
    repo = "constantdict";
    tag = "v${version}";
    hash = "sha256-M3duCafyJk/W3KIqP43ErXr/EfCj6/Sin6eCaaxyI5g=";
  };

  build-system = [
    hatchling
  ];

  pythonImportsCheck = [
    "constantdict"
  ];

  # Assumes that unpickling a pickled dict in a different Python process will result in a different hash.
  # This doesn't seem to work in the Nix sandbox but works fine in a normal environment.
  disabledTests = [
    "test_pickle_hash"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    homepage = "https://matthiasdiener.github.io/constantdict";
    downloadPage = "https://github.com/matthiasdiener/constantdict";
    description = "Immutable dictionary class for Python, implemented as a thin layer around Python's builtin dict class";
    changelog = "https://github.com/matthiasdiener/constantdict/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ qbisi ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -2805,6 +2805,8 @@ self: super: with self; {
  consonance = callPackage ../development/python-modules/consonance { };
  constantdict = callPackage ../development/python-modules/constantdict { };
  constantly = callPackage ../development/python-modules/constantly { };
  construct = callPackage ../development/python-modules/construct { };