python3Packages.datafusion: 0.7.0 -> 22.0.0

This commit is contained in:
Phillip Cloud 2023-04-15 07:03:25 -04:00 committed by Yt
parent 8b000a4f43
commit d5946bd416

View File

@ -1,6 +1,5 @@
{ lib { lib
, stdenv , stdenv
, fetchurl
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, fetchFromGitHub , fetchFromGitHub
@ -8,39 +7,45 @@
, pytestCheckHook , pytestCheckHook
, libiconv , libiconv
, numpy , numpy
, pandas , protobuf
, pyarrow , pyarrow
}: }:
let let
arrow-testing = fetchFromGitHub { arrow-testing = fetchFromGitHub {
name = "arrow-testing";
owner = "apache"; owner = "apache";
repo = "arrow-testing"; repo = "arrow-testing";
rev = "5bab2f264a23f5af68f69ea93d24ef1e8e77fc88"; rev = "47f7b56b25683202c1fd957668e13f2abafc0f12";
hash = "sha256-Pxx8ohUpXb5u1995IvXmxQMqWiDJ+7LAll/AjQP7ph8="; hash = "sha256-ZDznR+yi0hm5O1s9as8zq5nh1QxJ8kXCRwbNQlzXpnI=";
}; };
parquet-testing = fetchFromGitHub { parquet-testing = fetchFromGitHub {
name = "parquet-testing";
owner = "apache"; owner = "apache";
repo = "parquet-testing"; repo = "parquet-testing";
rev = "5b82793ef7196f7b3583e85669ced211cd8b5ff2"; rev = "b2e7cc755159196e3a068c8594f7acbaecfdaaac";
hash = "sha256-gcOvk7qFHZgJWE9CpucC8zwayYw47VbC3lmSRu4JQFg="; hash = "sha256-IFvGTOkaRSNgZOj8DziRj88yH5JRF+wgSDZ5N0GNvjk=";
}; };
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "datafusion"; pname = "datafusion";
version = "0.7.0"; version = "22.0.0";
format = "pyproject"; format = "pyproject";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; name = "datafusion-source";
hash = "sha256-XYXZMorPs2Ue7E38DASd4rmxvX0wlx8A6sCpAbYUh4I="; owner = "apache";
repo = "arrow-datafusion-python";
rev = "22.0.0";
hash = "sha256-EKurQ4h5IOTU3JiGN+MHrDciQUadUrywNRhnv9S/9iY=";
}; };
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
name = "datafusion-cargo-deps";
inherit src pname version; inherit src pname version;
hash = "sha256-6mPdKwsEN09Gf4eNsd/v3EBHVezHmff/KYB2lsXgzcA="; hash = "sha256-0kfavTFqsQ1Uvg5nQw6VFGlvih8ysOyS2KGT4cTIsVI=";
}; };
nativeBuildInputs = with rustPlatform; [ nativeBuildInputs = with rustPlatform; [
@ -48,15 +53,11 @@ buildPythonPackage rec {
maturinBuildHook maturinBuildHook
]; ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; buildInputs = [ protobuf ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
propagatedBuildInputs = [ propagatedBuildInputs = [ pyarrow ];
numpy
pandas
pyarrow
];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook numpy ];
pythonImportsCheck = [ "datafusion" ]; pythonImportsCheck = [ "datafusion" ];
pytestFlagsArray = [ "--pyargs" pname ]; pytestFlagsArray = [ "--pyargs" pname ];