From bba03d39a96f81fa583f0bcfa1fa71ee2e6699c2 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Mon, 31 Oct 2022 21:12:13 -0700 Subject: [PATCH] python310Packages.dill: 0.3.5.1 -> 0.3.6 1. Update version so that it is compatible with Python 3.11. 2. Run tests the same way that dill does. 3. Add myself to the maintainer list. --- .../python-modules/dill/default.nix | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/dill/default.nix b/pkgs/development/python-modules/dill/default.nix index 9167e629d573..ee54e80f3a6b 100644 --- a/pkgs/development/python-modules/dill/default.nix +++ b/pkgs/development/python-modules/dill/default.nix @@ -1,41 +1,31 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytestCheckHook +, python +, setuptools }: buildPythonPackage rec { pname = "dill"; - version = "0.3.5.1"; + version = "0.3.6"; + format = "pyproject"; src = fetchFromGitHub { owner = "uqfoundation"; repo = pname; rev = "refs/tags/dill-${version}"; - sha256 = "sha256-gWE7aQodblgHjUqGAzOJGgxJ4qx9wHo/DU4KRE6JMWo="; + hash = "sha256-lh1o/TqnqtYN9xTZom33y1/7ZhMEAFpheLdtalwgObQ="; }; - checkInputs = [ - pytestCheckHook + nativeBuildInputs = [ + setuptools ]; - # Tests seem to fail because of import pathing and referencing items/classes in modules. - # Seems to be a Nix/pathing related issue, not the codebase, so disabling failing tests. - disabledTestPaths = [ - "tests/test_diff.py" - "tests/test_module.py" - "tests/test_objects.py" - "tests/test_session.py" - ]; - - disabledTests = [ - "test_class_objects" - "test_importable" - "test_method_decorator" - "test_the_rest" - # test exception catching needs updating, can probably be removed with next update - "test_recursive_function" - ]; + checkPhase = '' + runHook preCheck + ${python.interpreter} dill/tests/__main__.py + runHook postCheck + ''; pythonImportsCheck = [ "dill" ]; @@ -43,6 +33,6 @@ buildPythonPackage rec { description = "Serialize all of python (almost)"; homepage = "https://github.com/uqfoundation/dill/"; license = licenses.bsd3; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ tjni ]; }; }