diff options
Diffstat (limited to 'pkgs/development/python-modules/pyutil/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyutil/default.nix | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/pyutil/default.nix b/pkgs/development/python-modules/pyutil/default.nix index 9b4023bc498d0..91f5d0d89f894 100644 --- a/pkgs/development/python-modules/pyutil/default.nix +++ b/pkgs/development/python-modules/pyutil/default.nix @@ -1,33 +1,66 @@ { lib , buildPythonPackage , fetchPypi -, simplejson +, isPyPy , mock +, pytestCheckHook +, pythonAtLeast +, pythonOlder +, setuptools +, simplejson , twisted -, isPyPy +, versioneer }: buildPythonPackage rec { pname = "pyutil"; version = "3.3.6"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-XcPWu5xbq6u10Ldz4JQEXXVxLos0ry0psOKGAmaCZ8A="; }; - propagatedBuildInputs = [ simplejson ]; - - nativeCheckInputs = [ mock twisted ]; - prePatch = lib.optionalString isPyPy '' grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g" ''; - meta = with lib; { - description = "Pyutil, a collection of mature utilities for Python programmers"; + nativeBuildInputs = [ + setuptools + versioneer + ]; + passthru.optional-dependencies = { + jsonutil = [ + simplejson + ]; + # Module not available + # randcookie = [ + # zbase32 + # ]; + }; + + nativeCheckInputs = [ + mock + twisted + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "pyutil" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/tpltnt/pyutil/issues/10 + "test_decimal" + "test_float" + ]; + + meta = with lib; { + description = "Collection of mature utilities for Python programmers"; longDescription = '' These are a few data structures, classes and functions which we've needed over many years of Python programming and which @@ -37,7 +70,6 @@ buildPythonPackage rec { Python language or its standard library, thus showing that we're not alone in wanting tools like these. ''; - homepage = "https://github.com/tpltnt/pyutil"; license = licenses.gpl2Plus; maintainers = with maintainers; [ prusnak ]; |