Merge pull request #264373 from edef1c/py-polars-0.19.12

python3Packages.polars: 0.18.13 -> 0.19.12
This commit is contained in:
Florian Klink 2023-10-31 16:21:28 +02:00 committed by GitHub
commit 4028031c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 906 additions and 297 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
diff --git a/crates/polars-lazy/src/frame/mod.rs b/crates/polars-lazy/src/frame/mod.rs
index 2d2ede651..be24b8809 100644
--- a/crates/polars-lazy/src/frame/mod.rs
+++ b/crates/polars-lazy/src/frame/mod.rs
@@ -25,7 +25,7 @@ pub use parquet::*;
use polars_core::frame::explode::MeltArgs;
use polars_core::prelude::*;
use polars_io::RowCount;
-use polars_plan::dsl::all_horizontal;
+use polars_plan::dsl::functions::all_horizontal;
pub use polars_plan::frame::{AllowedOptimizations, OptState};
use polars_plan::global::FETCH_ROWS;
#[cfg(any(feature = "ipc", feature = "parquet", feature = "csv"))]

View File

@ -3,20 +3,27 @@
, buildPythonPackage
, pythonOlder
, rustPlatform
, cmake
, libiconv
, fetchFromGitHub
, typing-extensions
, jemalloc
, rust-jemalloc-sys
, darwin
}:
let
pname = "polars";
version = "0.18.13";
version = "0.19.12";
rootSource = fetchFromGitHub {
owner = "pola-rs";
repo = "polars";
rev = "refs/tags/py-${version}";
hash = "sha256-kV30r2wmswpCUmMRaFsCOeRrlTN5/PU0ogaU2JIHq0E=";
hash = "sha256-6tn3Q6oZfMjgQ5l5xCFnGimLSDLOjTWCW5uEbi6yFZY=";
};
rust-jemalloc-sys' = rust-jemalloc-sys.override {
jemalloc = jemalloc.override {
disableInitExecTls = true;
};
};
in
buildPythonPackage {
@ -25,6 +32,13 @@ buildPythonPackage {
disabled = pythonOlder "3.6";
src = rootSource;
patches = [
# workaround for apparent rustc bug
# remove when we're at Rust 1.73
# https://github.com/pola-rs/polars/issues/12050
./all_horizontal.patch
];
# Cargo.lock file is sometimes behind actual release which throws an error,
# thus the `sed` command
# Make sure to check that the right substitutions are made when updating the package
@ -36,9 +50,7 @@ buildPythonPackage {
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"arrow2-0.17.3" = "sha256-pM6lNjMCpUzC98IABY+M23lbLj0KMXDefgBMjUPjDlg=";
"jsonpath_lib-0.3.0" = "sha256-NKszYpDGG8VxfZSMbsTlzcMGFHBOUeFojNw4P2wM3qk=";
"simd-json-0.10.0" = "sha256-0q/GhL7PG5SLgL0EETPqe8kn6dcaqtyL+kLU9LL+iQs=";
};
};
cargoRoot = "py-polars";
@ -48,10 +60,19 @@ buildPythonPackage {
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ typing-extensions ];
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
dontUseCmakeConfigure = true;
nativeBuildInputs = [
# needed for libz-ng-sys
# TODO: use pkgs.zlib-ng
cmake
] ++ (with rustPlatform; [
cargoSetupHook
maturinBuildHook
]);
buildInputs = [
rust-jemalloc-sys
rust-jemalloc-sys'
] ++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.Security