From a3613f11d5e034961e791f5a75e0fa55dda3683f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 16 Jun 2022 15:13:53 +0200 Subject: gnu: Add python-pyarrow-0.16. * gnu/packages/databases.scm (python-pyarrow-0.16): New variable. --- gnu/packages/databases.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 03ea55c6e1..92ab94f453 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -4442,6 +4442,64 @@ implementation, along with tools for interoperability with pandas, NumPy, and other traditional Python scientific computing packages.") (license license:asl2.0))) +(define-public python-pyarrow-0.16 + (package + (inherit apache-arrow-0.16) + (name "python-pyarrow") + (build-system python-build-system) + (arguments + '(#:tests? #f ; XXX There are no tests in the "python" directory + #:phases + (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"))) + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (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:lib" ,apache-arrow-0.16) + ("apache-arrow:include" ,apache-arrow-0.16 "include") + ("python-numpy" ,python-numpy) + ("python-pandas" ,python-pandas) + ("python-six" ,python-six))) + (native-inputs + (list cmake-minimal + pkg-config + python-cython + python-pytest + python-pytest-runner + python-setuptools-scm)) + (outputs '("out")) + (home-page "https://arrow.apache.org/docs/python/") + (synopsis "Python bindings for Apache Arrow") + (description + "This library provides a Pythonic API wrapper for the reference Arrow C++ +implementation, along with tools for interoperability with pandas, NumPy, and +other traditional Python scientific computing packages.") + (license license:asl2.0))) + (define-public python-crate (package (name "python-crate") -- cgit v1.2.3