2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
}:
|
|
|
|
|
|
|
|
with python3Packages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "parquet-tools";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.2.12";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ktrueda";
|
|
|
|
repo = "parquet-tools";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-5bK+kW550DgBhcH5INozwGKKjM+xXblmFg2Tu2rnos4=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_inspect.py \
|
|
|
|
--replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \
|
2022-11-04 12:27:35 +00:00
|
|
|
--replace "serialized_size: 2222" "serialized_size: 2221" \
|
|
|
|
--replace "format_version: 1.0" "format_version: 2.6"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"halo"
|
|
|
|
"tabulate"
|
|
|
|
"thrift"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
colorama
|
|
|
|
halo
|
|
|
|
pandas
|
|
|
|
pyarrow
|
|
|
|
tabulate
|
|
|
|
thrift
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
moto
|
|
|
|
pytest-mock
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-02-02 18:25:31 +00:00
|
|
|
# These tests try to read Python code as parquet and fail
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_local_wildcard"
|
|
|
|
"test_local_and_s3_wildcard_files"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"parquet_tools"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A CLI tool for parquet files";
|
|
|
|
homepage = "https://github.com/ktrueda/parquet-tools";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/ktrueda/parquet-tools/releases/tag/${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|