diff mbox series

[bug#56729,RFC,v3,07/32] gnu: Add python-primecountpy.

Message ID 7cea6d8ec60772ee41128e07c7ab21e51dac62a8.1685391447.git.guix@ikherbers.com
State New
Headers show
Series None | expand

Commit Message

vicvbcun May 29, 2023, 8:38 p.m. UTC
* gnu/packages/algebra.scm (python-primecountpy): New variable.
---
 gnu/packages/algebra.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 68a0427f59..ba1131f358 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1925,3 +1925,29 @@  (define-public primecount
 counts the number 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))
+    (native-inputs (list python-cython))
+    (propagated-inputs (list python-cysignals))
+    (home-page "https://github.com/dimpase/primecountpy")
+    (synopsis "Cython interface for primecount")
+    (description
+     "This package provides a cython interface for the primecount library.")
+    (license license:gpl3)))