guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit 9ea7023026b5c8acfeecd2caeeb3baae0564c5f5
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Fri Jan 9 09:51:32 2026 +0000
gnu: Add python-siphash24.
* gnu/packages/python-xyz.scm (python-siphash24): New variable.
Change-Id: I297103197b867e9be3a60caf53a8536f5c32aa63
---
gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 09f256f16d..a73d51516e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -210,6 +210,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages c)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
@@ -2399,6 +2400,52 @@ three consecutive points in a polyline or polygon
@end itemize")
(license license:expat)))
+(define-public python-siphash24
+ (package
+ (name "python-siphash24")
+ (version "1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dnicolodi/python-siphash24/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0i75mrm2w10njxqb3g1kp9v8r5d22a0v8vc68v0k8c7l3ncf0lp7"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-backend #~'custom
+ #:test-flags #~(list "test.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-pyproject
+ (lambda _
+ (substitute* "pyproject.toml"
+ ;; meson-python: error: Field `project.license` has an invalid
+ ;; type, expecting a dictionary of strings (got `Apache-2.0 OR
+ ;; LGPL-2.1-or-later`)
+ (("^license = .*")
+ "license = {text = \"Apache-2.0 OR
LGPL-2.1-or-later\"}\n")))))))
+ (native-inputs
+ (list meson-python
+ pkg-config
+ python-cython
+ python-pytest))
+ (inputs
+ (list c-siphash))
+ (home-page "https://github.com/dnicolodi/python-siphash24/")
+ (synopsis "Streaming-capable SipHash-1-3 and SipHash-2-4 Implementation")
+ (description
+ "This package provides a C-based implementation of
+@url{https://cr.yp.to/siphash/siphash-20120918.pdf, SipHash} with an interface
+compatible with the hash functions provided by the hashlib standard library
+module. SipHash-1-3 and SipHash-2-4 variants are currently implemented.")
+ ;; They are in LICENSES directory:
+ (license (list license:asl2.0
+ license:lgpl2.1+))))
+
(define-public python-snakesay
(package
(name "python-snakesay")