From 6692f793113c71068229e2e0e27a9b4464613bf0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 26 Aug 2021 21:38:07 +0200 Subject: [PATCH] python3Packages.frozendict: 1.2 -> 2.0.5 --- .../python-modules/frozendict/default.nix | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/frozendict/default.nix b/pkgs/development/python-modules/frozendict/default.nix index e172f3815b7e..4acf53563ded 100644 --- a/pkgs/development/python-modules/frozendict/default.nix +++ b/pkgs/development/python-modules/frozendict/default.nix @@ -1,16 +1,47 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +, isPy3k +, pytestCheckHook +, setuptoolsBuildHook +, python +}: buildPythonPackage rec { pname = "frozendict"; - version = "1.2"; + version = "2.0.5"; # 2.0.6 breaks canonicaljson + format = "setuptools"; + + disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"; + sha256 = "sha256-wb7hwHDY2fZA4SjluHV2pEAAhgCfeGLRPAv4YA5iE9M="; }; - # frozendict does not come with tests - doCheck = false; + pythonImportsCheck = [ + "frozendict" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + preCheck = '' + rm -r frozendict + export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH + ''; + + disabledTests = [ + # TypeError: unsupported operand type(s) for |=: 'frozendict.frozendict' and 'dict' + "test_union" + ]; + + disabledTestPaths = [ + # unpackaged test dependency: coold + "test/test_coold.py" + "test/test_coold_subclass.py" + ]; meta = with lib; { homepage = "https://github.com/slezica/python-frozendict";