summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Monego <[email protected]>2025-02-09 01:52:23 +0000
committerAndreas Enge <[email protected]>2025-02-10 14:27:57 +0100
commitc49d158d358ae29d68354479729d059055f8aad0 (patch)
treeba2ab38e6590aaa9b3e9dfe9981f46e80b60fe64
parent1c577237b1a2b8e81e91515d6030b772f181981b (diff)
gnu: Add python-cylp.
* gnu/packages/maths.scm (python-cylp): New variable. Change-Id: Id3467bc34833472aa7fca3416801a5fbf5c033e6 Signed-off-by: Andreas Enge <[email protected]>
-rw-r--r--gnu/packages/maths.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 47a81a510c..10b080afa2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2739,6 +2739,54 @@ linear and quadratic objectives. There are limited facilities for nonlinear
and quadratic objectives using the Simplex algorithm.")
(license license:epl1.0)))
+(define-public python-cylp
+ (package
+ (name "python-cylp")
+ (version "0.92.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cylp" version))
+ (sha256
+ (base32 "1mhvjrhvpgnpw4zwri92dj168qvyclcpsqvzbj5maxx5cilnhkww"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags #~(list "-k" (string-append
+ "not " (string-join
+ (list
+ "test_removeVar2" ; AssertionError
+ ;; Tests below segfault
+ "test_dantzig"
+ "test_lifo"
+ "test_mf"
+ "test_pe")
+ " and not ")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests? ; rebuild extensions
+ (invoke "python" "setup.py" "build_ext" "--inplace")))))))
+ (propagated-inputs (list python-numpy python-pytest python-scipy))
+ (inputs (list cbc))
+ (native-inputs (list pkg-config
+ python-cython-3
+ python-hypothesis
+ python-numpy
+ python-pytest
+ python-setuptools
+ python-wheel))
+ (home-page "https://github.com/coin-or/cylp")
+ (synopsis "Python interface for CLP, CBC, and CGL")
+ (description
+ "CyLP is a Python interface to COIN-OR’s Linear and mixed-integer program
+solvers (CLP, CBC, and CGL). CyLP’s unique feature is that you can use it to
+alter the solution process of the solvers from within Python. For example,
+you may define cut generators, branch-and-bound strategies, and primal/dual
+Simplex pivot rules completely in Python.")
+ (license license:epl2.0)))
+
(define-public gecode
(let* ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a")
(version (git-version "6.2.0" "1" commit)))