guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

09/12: gnu: Add python-cymem


From: guix-commits
Subject: 09/12: gnu: Add python-cymem
Date: Tue, 24 May 2022 11:21:52 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d442fe5eeef37ed70eff4f5ff95ad6dcd6f835a9
Author: Artyom V. Poptsov <poptsov.artyom@gmail.com>
AuthorDate: Thu May 12 22:43:29 2022 +0300

    gnu: Add python-cymem
    
    * gnu/packages/python-xyz.scm (python-cymem): New variable.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/python-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0148f482fc..7e1f16649c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31640,3 +31640,46 @@ It can generate reports as HTML tables or plain text 
lists.
 
 Scooby has no required dependencies, and only few optional dependencies.")
     (license license:expat)))
+
+(define-public python-cymem
+  (package
+    (name "python-cymem")
+    (version "2.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "cymem" version))
+              (sha256
+               (base32
+                "0pkyy60zk9654sj991w111p1l0m8wvz36nslw96x6nb9h6sjb5qn"))))
+    (build-system python-build-system)
+    (native-inputs
+     (list python-cython
+           python-pytest))
+    (inputs
+     (list python))
+    (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/cymem";)
+    (synopsis "Cython memory pool for RAII-style memory management")
+    (description
+     "Cymem provides two small memory-management helpers for Cython.  They 
make it
+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)))
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]