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";
|
2023-01-26 12:40:51 +00:00
|
|
|
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 \
|
2021-11-22 11:01:53 +00:00
|
|
|
--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
|
|
|
'';
|
|
|
|
|
2023-01-26 12:40:51 +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
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-11-22 01:56:43 +00:00
|
|
|
moto
|
|
|
|
pytest-mock
|
2023-01-26 12:40:51 +00:00
|
|
|
pytestCheckHook
|
2021-11-22 01:56:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-01-26 12:40:51 +00:00
|
|
|
# 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
|
|
|
];
|
|
|
|
|
2023-01-26 12:40:51 +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";
|
2023-01-26 12:40:51 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|