From 5a5c2e0e89e5f336bb3472d21c8fc11c666f387e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 4 May 2024 16:12:41 +0200 Subject: [PATCH] python312Packages.isal: init at 1.6.1 --- .../python-modules/isal/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/isal/default.nix diff --git a/pkgs/development/python-modules/isal/default.nix b/pkgs/development/python-modules/isal/default.nix new file mode 100644 index 000000000000..c37d9357ec53 --- /dev/null +++ b/pkgs/development/python-modules/isal/default.nix @@ -0,0 +1,67 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +# build-system +, setuptools + +# native dependencies +, isa-l + +# tests +, pytest-timeout +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "isal"; + version = "1.6.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pycompression"; + repo = "python-isal"; + rev = "v${version}"; + hash = "sha256-EhdKT2ftyU2zevFg9Yi3q2FVx0FmKwJMzszsK1NS3Qg="; + }; + + build-system = [ + setuptools + ]; + + buildInputs = [ + isa-l + ]; + + env.PYTHON_ISAL_LINK_DYNAMIC = true; + + nativeCheckInputs = [ + pytest-timeout + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests" + ]; + + disabledTests = [ + # calls `python -m isal` and fails on import + "test_compress_fast_best_are_exclusive" + "test_compress_infile_outfile" + "test_compress_infile_outfile_default" + "test_decompress_cannot_have_flags_compression" + "test_decompress_infile_outfile_error" + ]; + + pythonImportsCheck = [ + "isal" + ]; + + meta = with lib; { + changelog = "https://github.com/pycompression/python-isal/blob/${src.rev}/CHANGELOG.rst"; + description = "Faster zlib and gzip compatible compression and decompression by providing python bindings for the isa-l library"; + homepage = "https://github.com/pycompression/python-isal"; + license = licenses.psfl; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a78d1c956a7a..95a297bc76a4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5897,6 +5897,8 @@ self: super: with self; { irctokens = callPackage ../development/python-modules/irctokens { }; + isal = callPackage ../development/python-modules/isal { }; + isbnlib = callPackage ../development/python-modules/isbnlib { }; islpy = callPackage ../development/python-modules/islpy { };