unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: 55390@debbugs.gnu.org
Subject: [bug#55390] [PATCH] gnu: Add python-preshed
Date: Sat, 21 May 2022 17:16:03 +0300	[thread overview]
Message-ID: <8735h3gee4.fsf@gmail.com> (raw)
In-Reply-To: <87fsle7cui.fsf@gmail.com> (Artyom V. Poptsov's message of "Thu,  12 May 2022 22:47:01 +0300")


[-- Attachment #1.1: Type: text/plain, Size: 446 bytes --]

Hello,

this patch adds preshed[1] under the name 'python-preshed'.

The package depends on:
- 'python-murmurhash' (this package was recently merged to Guix.)
- 'python-cymem' (this package is awaiting the merge.)

'python-preshed' is the one of the dependencies of spaCy -- an NLP
library for Python.[2]

- Artyom

References:
1. "Cython hash tables that assume keys are pre-hashed"
   https://github.com/explosion/preshed
2. https://spacy.io/


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-preshed.patch --]
[-- Type: text/x-diff, Size: 2093 bytes --]

From af05b2f142efce971baa7d2843d96f493273967b Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 21 May 2022 11:37:47 +0300
Subject: [PATCH] gnu: Add python-preshed

* gnu/packages/python-xyz.scm (python-preshed): New variable.
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 832d5bd578..2eb876ed69 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31492,3 +31492,35 @@ easy to tie memory to a Python object's life-cycle, so that the memory is freed
 when the object is garbage collected.")
   (license license:expat)))
 
+(define-public python-preshed
+  (package
+    (name "python-preshed")
+    (version "3.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "preshed" version))
+              (sha256
+               (base32
+                "0akpydd23xqxx9d04drsnw9140rb3cv07r1zpzqz5wm0lf47afzv"))))
+    (build-system python-build-system)
+    (native-inputs (list python-cython python-cymem python-pytest))
+    (inputs (list python python-cymem python-murmurhash))
+    (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
+                 (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/preshed")
+    (synopsis "Cython hash tables that assume keys are pre-hashed")
+    (description
+     "Simple but high performance Cython hash table mapping pre-randomized keys
+to void* values.")
+    (license license:expat)))
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 207 bytes --]


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2022-05-21 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 19:47 [bug#55390] [PATCH] gnu: Add python-cymem Artyom V. Poptsov
2022-05-21 14:16 ` Artyom V. Poptsov [this message]
2022-05-24 14:46 ` bug#55390: " Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735h3gee4.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=55390@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).