Merge pull request #212773 from fabaff/parquet-tools-fix

parquet-tools: 0.2.9 -> 0.2.12
This commit is contained in:
Weijia Wang 2023-01-26 19:01:23 +01:00 committed by GitHub
commit a58215b5eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,5 @@
{ lib { lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, python3Packages , python3Packages
}: }:
@ -8,36 +7,34 @@ with python3Packages;
buildPythonApplication rec { buildPythonApplication rec {
pname = "parquet-tools"; pname = "parquet-tools";
version = "0.2.9"; version = "0.2.12";
disabled = pythonOlder "3.8";
format = "pyproject"; format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ktrueda"; owner = "ktrueda";
repo = "parquet-tools"; repo = "parquet-tools";
rev = version; rev = "refs/tags/${version}";
sha256 = "0aw0x7lhagp4dwis09fsizr7zbhdpliav0ns5ll5qny7x4m6rkfy"; hash = "sha256-5bK+kW550DgBhcH5INozwGKKjM+xXblmFg2Tu2rnos4=";
}; };
patches = [
(fetchpatch {
url = "https://github.com/ktrueda/parquet-tools/commit/1c70a07e1c9f17c8890d23aad3ded5dd6c706cb3.patch";
sha256 = "08j1prdqj8ksw8gwiyj7ivshk82ahmywbzmywclw52nlnniig0sa";
})
];
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \
--replace 'thrift = "^0.13.0"' 'thrift = "*"' \
--replace 'halo = "^0.0.29"' 'halo = "*"'
substituteInPlace tests/test_inspect.py \ substituteInPlace tests/test_inspect.py \
--replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \ --replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \
--replace "serialized_size: 2222" "serialized_size: 2221" \ --replace "serialized_size: 2222" "serialized_size: 2221" \
--replace "format_version: 1.0" "format_version: 2.6" --replace "format_version: 1.0" "format_version: 2.6"
''; '';
nativeBuildInputs = [ poetry-core ]; pythonRelaxDeps = [
"halo"
"tabulate"
"thrift"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [ propagatedBuildInputs = [
boto3 boto3
@ -50,20 +47,25 @@ buildPythonApplication rec {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook
moto moto
pytest-mock pytest-mock
pytestCheckHook
]; ];
disabledTests = [ disabledTests = [
# these tests try to read python code as parquet and fail # These tests try to read Python code as parquet and fail
"test_local_wildcard" "test_local_wildcard"
"test_local_and_s3_wildcard_files" "test_local_and_s3_wildcard_files"
]; ];
pythonImportsCheck = [
"parquet_tools"
];
meta = with lib; { meta = with lib; {
description = "A CLI tool for parquet files"; description = "A CLI tool for parquet files";
homepage = "https://github.com/ktrueda/parquet-tools"; homepage = "https://github.com/ktrueda/parquet-tools";
changelog = "https://github.com/ktrueda/parquet-tools/releases/tag/${version}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ cpcloud ]; maintainers = with maintainers; [ cpcloud ];
}; };