summary refs log tree commit diff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-02-11 15:51:56 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-02-19 08:16:47 +0100
commiteb96e148ca50fde3068f365ab4ebb6ab6dbf3dea (patch)
tree03b866aa2bfba939eca7d5d3547d5de980bb76b0 /gnu/packages/maths.scm
parent8285093cee000d6e28c040f721ddf0be18d32c42 (diff)
downloadguix-eb96e148ca50fde3068f365ab4ebb6ab6dbf3dea.tar.gz
gnu: Add python-clorm.
* gnu/packages/maths.scm (python-clorm): New variable.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fc85560114..1e40be8722 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2737,6 +2737,41 @@ satisfiability checking (SAT).")
 making it so that you can write @acronym{ASPs, Answer Set Programs} through
 Python code.")))
 
+(define-public python-clorm
+  (package
+   (name "python-clorm")
+   (version "1.4.1")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/potassco/clorm")
+                  (commit (string-append "v" version))))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "0jx99y71mrgdicn1da5dwz5nzgvvpabrikff783sg4shbv2cf0b5"))))
+   (build-system pyproject-build-system)
+   (arguments
+    (list #:phases
+          #~(modify-phases %standard-phases
+              (add-before 'check 'fix-breaking-tests
+                (lambda _
+                  ;; noclingo tests rely on this being set
+                  (setenv "CLORM_NOCLINGO" "1")
+                  (delete-file "tests/test_mypy_query.py")
+                  (substitute* "tests/test_clingo.py"
+                    (("self\\.assertTrue\\(os_called\\)" all)
+                     (string-append "# " all))))))))
+   (propagated-inputs (list python-clingo))
+   (native-inputs (list python-typing-extensions))
+   (home-page "https://potassco.org")
+   (synopsis "Object relational mapping to clingo")
+   (description "@acronym{Clorm, Clingo ORM} provides an @acronym{ORM,
+Object Relational Mapping} interface to the @acronym{ASP, answer set
+programming} solver clingo.  Its goal is to make integration of clingo
+into Python programs easier.")
+   (license license:expat)))
+
 (define-public python-telingo
   (package
     (name "python-telingo")