[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/12: gnu: python-pyarrow: Fix parquet support.
From: |
guix-commits |
Subject: |
08/12: gnu: python-pyarrow: Fix parquet support. |
Date: |
Wed, 28 Jul 2021 14:32:28 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 532cfc5bd2c5c46f994a799776e643f702fefe38
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Jul 28 20:06:49 2021 +0200
gnu: python-pyarrow: Fix parquet support.
Co-authored-by: Phil Beadling <phil@beadling.co.uk>.
* gnu/packages/databases.scm (python-pyarrow)[arguments]: Add phases
patch-cmake-variables, patch-parquet-library, and set-PYARROW_WITH_PARQUET.
[propagated-inputs]: Add "include" output of apache-arrow package.
---
gnu/packages/databases.scm | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7de85d1..7afda93 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3792,13 +3792,34 @@ algorithm implementations.")
(modify-phases %standard-phases
(delete 'build) ; XXX the build is performed again during the install
phase
(add-after 'unpack 'enter-source-directory
- (lambda _ (chdir "python") #t))
+ (lambda _ (chdir "python")))
(add-after 'unpack 'make-git-checkout-writable
(lambda _
- (for-each make-file-writable (find-files "."))
- #t)))))
+ (for-each make-file-writable (find-files "."))))
+ (add-before 'install 'patch-cmake-variables
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Replace cmake locations with hardcoded guix links for the
+ ;; underlying C++ library and headers. This is a pretty awful
+ ;; hack.
+ (substitute* "cmake_modules/FindParquet.cmake"
+ (("# Licensed to the Apache Software Foundation" m)
+ (string-append "set(PARQUET_INCLUDE_DIR \""
+ (assoc-ref inputs "apache-arrow:include")
+ "/share/include\")\n" m))
+ (("find_package_handle_standard_args" m)
+ (string-append "set(PARQUET_LIB_DIR \""
+ (assoc-ref inputs "apache-arrow:lib")
+ "/lib\")\n" m)))))
+ (add-before 'install 'patch-parquet-library
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("parquet_shared") "parquet"))))
+ (add-before 'install 'set-PYARROW_WITH_PARQUET
+ (lambda _
+ (setenv "PYARROW_WITH_PARQUET" "1"))))))
(propagated-inputs
- `(("apache-arrow" ,apache-arrow "lib")
+ `(("apache-arrow:lib" ,apache-arrow "lib")
+ ("apache-arrow:include" ,apache-arrow "include")
("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)
("python-six" ,python-six)))
- branch master updated (c20c9e1 -> 042b697), guix-commits, 2021/07/28
- 03/12: gnu: python-cloudpickle: Update to 1.6.0., guix-commits, 2021/07/28
- 09/12: gnu: Add python-heapdict., guix-commits, 2021/07/28
- 08/12: gnu: python-pyarrow: Fix parquet support.,
guix-commits <=
- 05/12: gnu: python-partd: Update to 1.2.0., guix-commits, 2021/07/28
- 07/12: gnu: python-pandas: Update to 1.3.0., guix-commits, 2021/07/28
- 01/12: gnu: cmake: Update to 3.21.1., guix-commits, 2021/07/28
- 12/12: gnu: Add python-modin., guix-commits, 2021/07/28
- 11/12: gnu: Add python-distributed., guix-commits, 2021/07/28
- 02/12: gnu: python2-cloudpickle: Override version, source, and native-inputs., guix-commits, 2021/07/28
- 06/12: gnu: python-dask: Update to 2021.7.1., guix-commits, 2021/07/28
- 04/12: gnu: python-numexpr: Update to 2.7.3., guix-commits, 2021/07/28
- 10/12: gnu: Add python-zict., guix-commits, 2021/07/28