From: Troy Figiel <troy@troyfigiel.com>
To: 68721@debbugs.gnu.org
Subject: [bug#68721] [PATCH 2/2] gnu: Add python-fastparquet.
Date: Sat, 2 Mar 2024 19:40:31 +0100 [thread overview]
Message-ID: <87y1b0pit1.fsf@troyfigiel.com> (raw)
In-Reply-To: <87le8dgjyu.fsf@troyfigiel.com>
* 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@posteo.ne
;;; Copyright © 2023 Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2024 Troy Figiel <troy@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
next prev parent reply other threads:[~2024-03-02 18:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 21:41 [bug#68721] [PATCH 0/2] gnu: Add python-fastparquet Troy Figiel
2024-01-25 20:39 ` [bug#68721] [PATCH 1/2] gnu: Add python-cramjam Troy Figiel
2024-01-25 20:45 ` [bug#68721] [PATCH 2/2] gnu: Add python-fastparquet Troy Figiel
2024-03-01 8:00 ` [bug#68721] [PATCH 0/2] " Sharlatan Hellseher
2024-03-02 18:40 ` [bug#68721] [PATCH 1/2] gnu: Add python-cramjam Troy Figiel
2024-03-02 18:40 ` Troy Figiel [this message]
2024-03-02 18:41 ` [bug#68721] [PATCH v2 0/2] gnu: Add python-fastparquet Troy Figiel
2024-03-03 8:16 ` bug#68721: [PATCH " Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1b0pit1.fsf@troyfigiel.com \
--to=troy@troyfigiel.com \
--cc=68721@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.