From 4d9830835f568f380b0bbf336ed386bfcf9a849b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 6 Nov 2023 21:39:54 +0100 Subject: [PATCH] python311Packages.aiohttp-zlib-ng: init at 0.1.1 Enable zlib_ng on aiohttp --- .../aiohttp-zlib-ng/default.nix | 39 +++++++++++++++++++ .../python-modules/zlib-ng/default.nix | 10 +++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/aiohttp-zlib-ng/default.nix diff --git a/pkgs/development/python-modules/aiohttp-zlib-ng/default.nix b/pkgs/development/python-modules/aiohttp-zlib-ng/default.nix new file mode 100644 index 000000000000..35be33c05482 --- /dev/null +++ b/pkgs/development/python-modules/aiohttp-zlib-ng/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, aiohttp +, zlib-ng +}: + +buildPythonPackage rec { + pname = "aiohttp-zlib-ng"; + version = "0.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "bdraco"; + repo = "aiohttp-zlib-ng"; + rev = "v${version}"; + hash = "sha256-dTNwt4eX6ZQ8ySK2/9ziVbc3KFg2aL/EsiBWaJRC4x8="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + zlib-ng + ]; + + pythonImportsCheck = [ "aiohttp_zlib_ng" ]; + + meta = with lib; { + description = "Enable zlib_ng on aiohttp"; + homepage = "https://github.com/bdraco/aiohttp-zlib-ng"; + changelog = "https://github.com/bdraco/aiohttp-zlib-ng/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/zlib-ng/default.nix b/pkgs/development/python-modules/zlib-ng/default.nix index 36a8f98c0fb0..397309d086ae 100644 --- a/pkgs/development/python-modules/zlib-ng/default.nix +++ b/pkgs/development/python-modules/zlib-ng/default.nix @@ -50,6 +50,16 @@ buildPythonPackage rec { rm -rf src ''; + disabledTests = [ + # commandline tests fail to find the built module + "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" + "test_decompress_infile_outfile_error" + ]; + meta = with lib; { description = "A drop-in replacement for Python's zlib and gzip modules using zlib-ng"; homepage = "https://github.com/pycompression/python-zlib-ng"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bc5c461f12db..889c309ec216 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -250,6 +250,8 @@ self: super: with self; { aiohttp-wsgi = callPackage ../development/python-modules/aiohttp-wsgi { }; + aiohttp-zlib-ng = callPackage ../development/python-modules/aiohttp-zlib-ng { }; + aioitertools = callPackage ../development/python-modules/aioitertools { }; aiobiketrax = callPackage ../development/python-modules/aiobiketrax { };