@@ -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)))