python310Packages.fastparquet: add optional dependency
This commit is contained in:
parent
b352fc5543
commit
32a2f6fe6f
|
@ -8,28 +8,50 @@
|
|||
, cramjam
|
||||
, fsspec
|
||||
, thrift
|
||||
, python-lzo
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fastparquet";
|
||||
version = "0.8.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dask";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "05qb4nz87p9vnrdsyl25hdp5sj35lki64gjza5dahc89fwfdnsmd";
|
||||
hash = "sha256-rWrbHHcJMahaUV8+YuKkZUhdboNFUK9btjvdg74lCxc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cramjam
|
||||
fsspec
|
||||
numba
|
||||
numpy
|
||||
pandas
|
||||
thrift
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
lzo = [
|
||||
python-lzo
|
||||
];
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "'pytest-runner'," "" \
|
||||
--replace "oldest-supported-numpy" "numpy"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ cramjam fsspec numba numpy pandas thrift ];
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
# Workaround https://github.com/NixOS/nixpkgs/issues/123561
|
||||
preCheck = ''
|
||||
|
@ -43,7 +65,9 @@ buildPythonPackage rec {
|
|||
rm "$fastparquet_test"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "fastparquet" ];
|
||||
pythonImportsCheck = [
|
||||
"fastparquet"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python implementation of the parquet format";
|
||||
|
|
Loading…
Reference in a new issue