parquet-tools: use addBinToPathHook

This commit is contained in:
Pol Dellaiera 2025-02-03 22:18:39 +01:00
parent 2964352875
commit 11613c422c

View file

@ -2,11 +2,10 @@
lib,
fetchFromGitHub,
python3Packages,
addBinToPathHook,
}:
with python3Packages;
buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "parquet-tools";
version = "0.2.16";
@ -27,7 +26,7 @@ buildPythonApplication rec {
postPatch = ''
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 ${python3Packages.pyarrow.version}" \
--replace "serialized_size: 2222" "serialized_size: 2221" \
--replace "format_version: 1.0" "format_version: 2.6"
'';
@ -38,11 +37,11 @@ buildPythonApplication rec {
"thrift"
];
nativeBuildInputs = [
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = [
propagatedBuildInputs = with python3Packages; [
boto3
colorama
halo
@ -52,16 +51,16 @@ buildPythonApplication rec {
thrift
];
# TestGetMetaData.test_inspect shells out to `parquet-tools` CLI entrypoint
preCheck = ''
export PATH=$out/bin:$PATH
'';
nativeCheckInputs = [
moto
pytest-mock
pytestCheckHook
];
nativeCheckInputs =
with python3Packages;
[
moto
pytest-mock
pytestCheckHook
]
++ [
addBinToPathHook
];
disabledTests = [
# test file is 2 bytes bigger than expected