summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorBonfaceKilz <me@bonfacemunyoki.com>2021-04-14 23:55:01 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-04-15 11:27:21 +0300
commit565ecf84575b10c0e70a7e5628bbde87baf1bc95 (patch)
treecfd9f2e930eea882e02cb6b9f710784b70b3fa16 /gnu/packages
parentc578d7a25af52d2c35ee9baee97b6e4ab3095783 (diff)
gnu: Add python-quicktions.
* gnu/packages/python-xyz.scm (python-quicktions): New variable. Co-authored-by: jgart <jgart@dismail.de> Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 17fdbc4d35..9d115790e1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24686,6 +24686,46 @@ Django template systems, the filters can be used in any environment.")
runs on, such as a reliable machine-readable ID, or version information.")
(license license:asl2.0)))
+(define-public python-quicktions
+ (package
+ (name "python-quicktions")
+ (version "1.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "quicktions" version))
+ (sha256
+ (base32
+ "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This file is generated by Cython.
+ (delete-file "src/quicktions.c") #t))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'cythonize-sources
+ (lambda _
+ (with-directory-excursion "src"
+ (invoke "cython" "quicktions.pyx"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest"))
+ #t)))))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/scoder/quicktions")
+ (synopsis "Fast fractions data type for rational numbers")
+ (description
+ "This package provides fast fractions data type for rational numbers. It
+is the cythonized version of @code{fractions.Fraction}.")
+ (license license:psfl)))
+
(define-public python-pathvalidate
(package
(name "python-pathvalidate")