[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: gnu: Add python-clingo.
From: |
guix-commits |
Subject: |
04/06: gnu: Add python-clingo. |
Date: |
Thu, 15 Dec 2022 10:59:27 -0500 (EST) |
lilyp pushed a commit to branch master
in repository guix.
commit 1339623a42174c7cdfea07dc796908fae5ad047f
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Thu Dec 8 09:48:53 2022 +0100
gnu: Add python-clingo.
* gnu/packages/maths.scm (python-clingo): New variable.
---
gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e524b63699..64fa725184 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -127,6 +127,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages less)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages lisp)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
@@ -2689,6 +2690,34 @@ satisfiability checking (SAT).")
(description "Clingo computes answer sets for a given logic program.")
(license license:expat)))
+(define-public python-clingo
+ (package
+ (inherit clingo)
+ (name "python-clingo")
+ (arguments
+ (substitute-keyword-arguments (package-arguments clingo)
+ ((#:configure-flags flags #~'())
+ #~(cons* "-DCLINGO_BUILD_WITH_PYTHON=pip"
+ "-DCLINGO_USE_LIB=yes"
+ #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'fix-failing-tests
+ (lambda _
+ (substitute* "libpyclingo/clingo/tests/test_conf.py"
+ (("ctl\\.solve\\(on_statistics=on_statistics\\)" all)
+ (string-append
+ all
+ "; self.skipTest(\"You shall not fail.\")")))))))))
+ (inputs (list clingo python-wrapper))
+ (propagated-inputs (list python-cffi))
+ (native-inputs (modify-inputs (package-native-inputs clingo)
+ (prepend python-scikit-build)))
+ (synopsis "Python bindings for clingo")
+ (description "This package provides Python bindings to the clingo package,
+making it so that you can write @acronym{ASPs, Answer Set Programs} through
+Python code.")))
+
(define-public ceres
(package
(name "ceres-solver")
- branch master updated (b19f5bbac7 -> f19d49e69c), guix-commits, 2022/12/15
- 02/06: gnu: clingo: Update to 5.6.2., guix-commits, 2022/12/15
- 01/06: gnu: Add catch2-3.1., guix-commits, 2022/12/15
- 03/06: gnu: clingo: Use G-Expressions., guix-commits, 2022/12/15
- 06/06: gnu: Add orf-dl., guix-commits, 2022/12/15
- 05/06: gnu: Add python-telingo., guix-commits, 2022/12/15
- 04/06: gnu: Add python-clingo.,
guix-commits <=