Skip to content

Commit

Permalink
python312Packages.fastexcel: init at 0.12.1 (#373419)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Jan 14, 2025
2 parents 8042f96 + 9bfe9c9 commit 5ecb91a
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
84 changes: 84 additions & 0 deletions pkgs/development/python-modules/fastexcel/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
rustPlatform,

# nativeBuildInputs
cargo,
rustc,

# dependencies
pyarrow,
pythonOlder,
typing-extensions,

# optional-dependencies
pandas,
polars,

# tests
pytest-mock,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "fastexcel";
version = "0.12.1";
pyproject = true;

src = fetchFromGitHub {
owner = "ToucanToco";
repo = "fastexcel";
tag = "v${version}";
hash = "sha256-1BcArjhdbsYZ8VIz1FJYOLKSKQXOjLUXFonIXB+TfiY=";
};

cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-JGDNqRF264hNAjQ9bwJnBsQgAcqJjreEbgRZAA58JnY=";
};

nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];

dependencies =
[
pyarrow
]
++ lib.optionals (pythonOlder "3.9") [
typing-extensions
];

optional-dependencies = {
pandas = [
pandas
];
polars = [
polars
];
};

pythonImportsCheck = [
"fastexcel"
];

nativeCheckInputs = [
pandas
polars
pytest-mock
pytestCheckHook
];

meta = {
description = "Fast excel file reader for Python, written in Rust";
homepage = "https://github.com/ToucanToco/fastexcel/";
changelog = "https://github.com/ToucanToco/fastexcel/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4484,6 +4484,8 @@ self: super: with self; {

faster-whisper = callPackage ../development/python-modules/faster-whisper { };

fastexcel = callPackage ../development/python-modules/fastexcel { };

fastimport = callPackage ../development/python-modules/fastimport { };

fastjet = callPackage ../development/python-modules/fastjet { };
Expand Down

0 comments on commit 5ecb91a

Please sign in to comment.