From 7e315248b73d34ba204ec945b316f46e01e27156 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 3 May 2022 08:27:05 +0200 Subject: [PATCH] python310Packages.filetype: 1.0.10 -> 1.0.13 --- .../python-modules/filetype/default.nix | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/filetype/default.nix b/pkgs/development/python-modules/filetype/default.nix index 3c777d828b4..1a85a61f642 100644 --- a/pkgs/development/python-modules/filetype/default.nix +++ b/pkgs/development/python-modules/filetype/default.nix @@ -1,21 +1,41 @@ { lib , buildPythonPackage , fetchPypi -, python +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "filetype"; - version = "1.0.10"; + version = "1.0.13"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-MjoTUAcxtsZaJTvDkwu86aVt+6cekLYP/ZaKtp2a6Tc="; + hash = "sha256-ahBHYv6T11XJYqqWyz2TCkj5GgdhBHEmxe6tIVPjOwM="; }; - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "filetype" + ]; + + disabledTests = [ + # https://github.com/h2non/filetype.py/issues/119 + "test_guess_memoryview" + "test_guess_extension_memoryview" + "test_guess_mime_memoryview" + ]; + + disabledTestPaths = [ + # We don't care about benchmarks + "tests/test_benchmark.py" + ]; meta = with lib; { description = "Infer file type and MIME type of any file/buffer";