diff mbox series

[bug#56729,RFC,v2,15/29] gnu: Add python-primecountpy.

Message ID a5aba7fd11e67e43802eab00ce3608b58e255714.1659973115.git.guix@ikherbers.com
State New
Headers show
Series Add sagemath. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

vicvbcun Aug. 8, 2022, 3:45 p.m. UTC
* gnu/packages/sagemath.scm (python-primecountpy): New variable.
---
 gnu/packages/sagemath.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 20cc1f3589..d8b70e6f23 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -26,6 +26,7 @@  (define-module (gnu packages sagemath)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -423,3 +424,26 @@  (define-public primecount
 of primes ≤ x (maximum 10^31) using highly optimized implementations of the
 combinatorial prime counting algorithms.")
     (license license:bsd-2)))
+
+(define-public python-primecountpy
+  (package
+    (name "python-primecountpy")
+    (version "0.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "primecountpy" version))
+              (sha256
+               (base32
+                "0xh6zx5zw5scy7jygqirks9y6z4zyfm0zjfp8nd6dw0m471przkq"))))
+    (build-system python-build-system)
+    (arguments (list #:phases #~(modify-phases %standard-phases
+                                  (add-before 'build 'set-cflags
+                                    (lambda _
+                                      (setenv "CFLAGS" "-fopenmp")
+                                      (setenv "CXXFLAGS" "-fopenmp"))))))
+    (inputs (list pari-gp primecount))
+    (propagated-inputs (list python-cysignals python-cython))
+    (home-page "https://github.com/dimpase/primecountpy")
+    (synopsis "Cython interface for C++ primecount library")
+    (description "Cython interface for C++ primecount library")
+    (license license:gpl3)))