diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-28 23:17:57 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-28 23:23:50 +0100 |
commit | 20f19261e4bfdd239b192c3f9beb722970dc67a0 (patch) | |
tree | 2d7dc4ef47f2e20d7cc8bac37528eefdac9746ec /gnu/packages/databases.scm | |
parent | d942cf18c28c2edfa1ee2e8ea6f41d0f7eaca4c3 (diff) |
gnu: python-pyarrow: Fix build.
Resolve regression introduced in
c2d172fc74dcb34a34f26e51d7a01fffa1442ea7 as seen in CI
<https://ci.guix.gnu.org/build/5481081/log/raw>.
* gnu/packages/databases.scm (python-pyarrow)
[arguments]: <#:phases>: Add 'set-version phase.
In 'set-pyarrow-build-options phase sort environment variables
alphabetically, add PYARROW_CMAKE_OPTIONS, PYARROW_PARALLEL,
PYARROW_WITH_HDFS.
Change-Id: I85bb78e49fa207d19080e15db09d9764c7f84c25
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r-- | gnu/packages/databases.scm | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 9d1b9643c43..40002f788a2 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -5034,18 +5034,44 @@ algorithm implementations.") (build-system python-build-system) (arguments (list - #:tests? #f ; XXX There are no tests in the "python" directory + ;; XXX: Test data is distributed sepratly in + ;; <https://github.com/apache/arrow-testing> 39MiB and requires + ;; additional steps to be implemented, see + ;; <https://github.com/apache/arrow/blob/main/ci/scripts/python_build.sh>. + #:tests? #f #: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 'enter-source-directory 'set-version + (lambda _ + ;; XXX: This python-setuptools-scm option is available in v8+: + ;; TypeError: Configuration.__init__() got an unexpected + ;; keyword argument 'version_file' + (substitute* "pyproject.toml" + (("version_file = .*") "")) + + ;; Version file generation ad-hoc, remove when a newer version + ;; of python-setuptools-scm is packed. + (with-output-to-file "pyarrow/_generated_version.py" + (let* ((version #$(package-version this-package) ) + (version-tuple (string-join (string-split version #\.) ", "))) + (lambda () + (format #t + "__version__ = version = '~a' +__version_tuple__ = version_tuple = (~a)~%" version version-tuple)))))) (add-before 'install 'set-pyarrow-build-options (lambda _ (setenv "PYARROW_BUNDLE_ARROW_CPP_HEADERS" "0") + (setenv "PYARROW_CMAKE_OPTIONS" + (string-append "-DCMAKE_INSTALL_RPATH=" #$output)) + (setenv "PYARROW_PARALLEL" + (number->string (parallel-job-count))) + (setenv "PYARROW_WITH_DATASET" "1") + (setenv "PYARROW_WITH_HDFS" "1") (setenv "PYARROW_WITH_ORC" "1") - (setenv "PYARROW_WITH_PARQUET" "1") - (setenv "PYARROW_WITH_DATASET" "1")))))) + (setenv "PYARROW_WITH_PARQUET" "1")))))) (propagated-inputs (list (list apache-arrow "lib") (list apache-arrow "include") |