From 2f564f0ef57ddb5f99473ce49923222f6fcfed67 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sat, 14 May 2022 22:22:06 +0300 Subject: [PATCH] gnu: Add python-murmurhash * gnu/packages/python-xyz.scm (python-murmurhash): New variable. --- gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 94eedcb221..5460fcebcf 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -31193,3 +31193,44 @@ nested data structures in Python like lists and dictionaries.") of fast and robust hash functions. This library is a Python extension module written in C.") (license license:public-domain))) + +(define-public python-murmurhash + (package + (name "python-murmurhash") + (version "1.0.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "murmurhash" version)) + (sha256 + (base32 "0vwkn98c703nvsigl2nz99rax2pafkx3djjfkgc49jiipmp3j2k3")))) + (build-system python-build-system) + (native-inputs + (list python-cython + python-pytest)) + (inputs + (list python + python-murmurhash3)) + (arguments + (list + #:modules '((ice-9 ftw) + (ice-9 match) + (guix build utils) + (guix build python-build-system)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-source-file-times-to-1980 + ;; XXX One of the tests uses a ZIP library to pack up some of the + ;; source tree, and fails with "ZIP does not support timestamps + ;; before 1980". Work around this by setting the file times in the + ;; source tree to sometime in early 1980. + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (ftw "." (lambda (file stat flag) + (utime file circa-1980 circa-1980) + #t)))))))) + (home-page "https://github.com/explosion/murmurhash") + (synopsis "Cython bindings for MurmurHash2") + (description + "Cython bindings for MurmurHash2.") + (license license:expat))) -- 2.25.1