Commit 3730c68c authored by Florian Klink's avatar Florian Klink
Browse files

python312Packages.pcodec: init at 0.4.2

Pcodec (or Pco) losslessly compresses and decompresses numerical
sequences with high compression ratio and moderately fast speed.

This adds the Python package.
parent 87cdfe52
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  rustPlatform,
  pytestCheckHook,

  numpy,
}:

buildPythonPackage rec {
  pname = "pcodec";
  version = "0.4.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pcodec";
    repo = "pcodec";
    tag = "v${version}";
    hash = "sha256-xWGtTtjMz62LnZDpBtp3HWPW9JgDovObUVSxWM3t1Ng=";
  };

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit src;
    name = "${pname}-${version}";
    hash = "sha256-91p0eoVRzc9S8pHRhAlRey4k4jW9IMttiH+9Joh91IQ=";
  };

  buildAndTestSubdir = "pco_python";

  dependencies = [ numpy ];

  nativeBuildInputs = [
    rustPlatform.cargoSetupHook
    rustPlatform.maturinBuildHook
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pcodec" ];

  meta = {
    description = "Lossless codec for numerical data";
    homepage = "https://github.com/pcodec/pcodec";
    changelog = "https://github.com/pcodec/pcodec/releases/tag/v${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      flokli
    ];
    badPlatforms = [
      # Illegal instruction: 4
      "x86_64-darwin"
    ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -11428,6 +11428,8 @@ self: super: with self; {
  pcffont = callPackage ../development/python-modules/pcffont { };
  pcodec = callPackage ../development/python-modules/pcodec { };
  pcodedmp = callPackage ../development/python-modules/pcodedmp { };
  pcpp = callPackage ../development/python-modules/pcpp { };