GNU bug report logs -
#68721
[PATCH 0/2] gnu: Add python-fastparquet.
Previous Next
Reported by: Troy Figiel <troy <at> troyfigiel.com>
Date: Thu, 25 Jan 2024 21:53:02 UTC
Severity: normal
Tags: patch
Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/databases.scm (python-fastparquet): New variable.
---
gnu/packages/databases.scm | 68 ++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index db4fe0b447..5ec0234ef1 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -62,6 +62,7 @@
;;; Copyright © 2023 Felix Gruber <felgru <at> posteo.ne
;;; Copyright © 2023 Munyoki Kilyungi <me <at> bonfacemunyoki.com>
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2024 Troy Figiel <troy <at> troyfigiel.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -143,6 +144,7 @@ (define-module (gnu packages databases)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
@@ -4984,6 +4986,72 @@ (define-public python-pyarrow-0.16
other traditional Python scientific computing packages.")
(license license:asl2.0)))
+(define-public python-fastparquet
+ (package
+ (name "python-fastparquet")
+ (version "2024.2.0")
+ (source
+ (origin
+ ;; Fastparquet uses setuptools-scm to find the current version. This
+ ;; only works when we use the PyPI tarball, which does not contain
+ ;; tests. Instead, we use the git-fetch method and add the version back
+ ;; ourselves.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dask/fastparquet")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0f32dj1xvd11l0siznqd33dpjlhg9siylcjcfkcdlqfcy45jfj3v"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ ;; Make sure to add back the missing version information
+ ;; the build phase.
+ (add-after 'unpack 'set-version
+ (lambda _
+ (call-with-output-file "fastparquet/_version.py"
+ (lambda (port)
+ (format port "__version__ = ~a"
+ (string-append "\""
+ #$version "\""))))))
+ (add-after 'unpack 'relax-dependencies
+ (lambda _
+ (substitute* "setup.py"
+ ;; Remove dependencies on git and setuptools-scm.
+ (("^.*\"git\", \"status\".*$")
+ "")
+ (("'setuptools-scm>1.5.4',")
+ "")
+ ;; Guix is only compatible with a single version of numpy
+ ;; at a time. We can safely remove this dependency.
+ (("'oldest-supported-numpy'")
+ ""))))
+ ;; Cython extensions need to be built for the check phase.
+ (add-before 'check 'build-cython-extensions
+ (lambda _
+ (invoke "python" "setup.py" "build_ext" "--inplace"))))))
+ (propagated-inputs (list python-cramjam python-fsspec python-numpy
+ python-packaging python-pandas))
+ (native-inputs (list python-cython python-pytest-runner))
+ (home-page "https://github.com/dask/fastparquet")
+ (synopsis "Python implementation of the Parquet file format")
+ (description
+ "@code{fastparquet} is a Python implementation of the Parquet file
+format. @code{fastparquet} is used implicitly by @code{dask}, @code{pandas}
+and @code{intake-parquet}. It supports the following compression algorithms:
+
+@itemize
+@item Gzip
+@item Snappy
+@item Brotli
+@item LZ4
+@item Zstd
+@item LZO (optionally)
+@end itemize")
+ (license license:asl2.0)))
+
(define-public python-crate
(package
(name "python-crate")
--
2.42.0
This bug report was last modified 1 year and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.