nixpkgs/pkgs/tools/misc/parquet-tools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.5 KiB
Nix
Raw Normal View History

2021-11-22 01:56:43 +00:00
{ lib
, fetchFromGitHub
, python3Packages
}:
with python3Packages;
buildPythonApplication rec {
pname = "parquet-tools";
2023-07-02 11:35:41 +00:00
version = "0.2.14";
2021-11-22 01:56:43 +00:00
format = "pyproject";
src = fetchFromGitHub {
owner = "ktrueda";
repo = "parquet-tools";
rev = "refs/tags/${version}";
2023-07-02 11:35:41 +00:00
hash = "sha256-2jIwDsxB+g37zV9hLc2VNC5YuZXTpTmr2aQ72AeHYJo=";
2021-11-22 01:56:43 +00:00
};
postPatch = ''
substituteInPlace tests/test_inspect.py \
--replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \
2022-11-01 19:19:04 +00:00
--replace "serialized_size: 2222" "serialized_size: 2221" \
--replace "format_version: 1.0" "format_version: 2.6"
2021-11-22 01:56:43 +00:00
'';
pythonRelaxDeps = [
"halo"
"tabulate"
"thrift"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
2021-11-22 01:56:43 +00:00
propagatedBuildInputs = [
boto3
colorama
halo
pandas
pyarrow
tabulate
thrift
];
nativeCheckInputs = [
2021-11-22 01:56:43 +00:00
moto
pytest-mock
pytestCheckHook
2021-11-22 01:56:43 +00:00
];
disabledTests = [
# These tests try to read Python code as parquet and fail
2021-11-22 01:56:43 +00:00
"test_local_wildcard"
"test_local_and_s3_wildcard_files"
2023-07-01 01:39:22 +00:00
# test file is 2 bytes bigger than expected
"test_excute_simple"
2021-11-22 01:56:43 +00:00
];
pythonImportsCheck = [
"parquet_tools"
];
2021-11-22 01:56:43 +00:00
meta = with lib; {
description = "A CLI tool for parquet files";
homepage = "https://github.com/ktrueda/parquet-tools";
changelog = "https://github.com/ktrueda/parquet-tools/releases/tag/${version}";
2021-11-22 01:56:43 +00:00
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];
2023-11-27 01:17:53 +00:00
mainProgram = "parquet-tools";
2021-11-22 01:56:43 +00:00
};
}