mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-14 17:23:57 +00:00
Diff: https://github.com/ToucanToco/fastexcel/compare/v0.20.1...v0.20.2 Changelog: https://github.com/ToucanToco/fastexcel/releases/tag/v0.20.2
84 lines
1.5 KiB
Nix
84 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
|
|
# nativeBuildInputs
|
|
cargo,
|
|
rustc,
|
|
|
|
# optional-dependencies
|
|
pandas,
|
|
polars,
|
|
pyarrow,
|
|
|
|
# tests
|
|
pytest-mock,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "fastexcel";
|
|
version = "0.20.2";
|
|
pyproject = true;
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ToucanToco";
|
|
repo = "fastexcel";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-lceUFw9+FsEoCWSNieCYGJW+pCqCpfthEAFCfXKdpj0=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) pname version src;
|
|
hash = "sha256-04jqysfab+mEir1f2kc15DCdueu1h+HS4FOIol4sBZY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cargo
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
rustc
|
|
];
|
|
|
|
optional-dependencies = {
|
|
pyarrow = [
|
|
pyarrow
|
|
];
|
|
pandas = [
|
|
pandas
|
|
pyarrow
|
|
];
|
|
polars = [
|
|
polars
|
|
];
|
|
};
|
|
|
|
pythonImportsCheck = [
|
|
"fastexcel"
|
|
"fastexcel._fastexcel"
|
|
];
|
|
|
|
preCheck = ''
|
|
rm -rf python/fastexcel
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pandas
|
|
polars
|
|
pyarrow
|
|
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/${finalAttrs.src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
|
};
|
|
})
|