2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
2023-01-20 10:41:00 +00:00
|
|
|
, cython
|
|
|
|
, setuptools
|
|
|
|
, substituteAll
|
2021-07-14 22:03:04 +00:00
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, cramjam
|
|
|
|
, fsspec
|
|
|
|
, thrift
|
2022-06-26 10:26:21 +00:00
|
|
|
, python-lzo
|
2021-07-14 22:03:04 +00:00
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, pythonOlder
|
2023-04-29 16:46:19 +00:00
|
|
|
, packaging
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastparquet";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2023.4.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dask";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-1hWiwXjTgflQlmy0Dk2phUa1cgYBvvH99tb0TdUmDRI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./version.patch;
|
|
|
|
inherit version;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'," "" \
|
|
|
|
--replace "oldest-supported-numpy" "numpy"
|
|
|
|
|
|
|
|
sed -i '/"git", "status"/d' setup.py
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cramjam
|
|
|
|
fsspec
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
thrift
|
2023-04-29 16:46:19 +00:00
|
|
|
packaging
|
2022-06-26 10:26:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
lzo = [
|
|
|
|
python-lzo
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# Workaround https://github.com/NixOS/nixpkgs/issues/123561
|
|
|
|
preCheck = ''
|
|
|
|
mv fastparquet/test .
|
2021-09-18 10:52:07 +00:00
|
|
|
rm -r fastparquet
|
2021-07-14 22:03:04 +00:00
|
|
|
fastparquet_test="$out"/${python.sitePackages}/fastparquet/test
|
|
|
|
ln -s `pwd`/test "$fastparquet_test"
|
|
|
|
'';
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
postCheck = ''
|
|
|
|
rm "$fastparquet_test"
|
|
|
|
'';
|
2021-02-17 17:02:09 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastparquet"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A python implementation of the parquet format";
|
|
|
|
homepage = "https://github.com/dask/fastparquet";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|