[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/64: gnu: Add python-osqp.
From: |
guix-commits |
Subject: |
19/64: gnu: Add python-osqp. |
Date: |
Thu, 2 May 2024 10:52:25 -0400 (EDT) |
rekado pushed a commit to branch wip-python-team
in repository guix.
commit 41f1c0c888870942bf3c9884b28955c42a49927a
Author: Marco Baggio <marco.baggio@mdc-berlin.de>
AuthorDate: Mon Apr 29 14:59:12 2024 +0200
gnu: Add python-osqp.
* gnu/packages/python-science.scm (python-osqp): New variable.
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
Change-Id: Id6f1665505469fd6543046636b82d0730b319df3
---
gnu/packages/python-science.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 37ffcf188e..5a9666fb47 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -89,6 +89,58 @@
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject))
+(define-public python-osqp
+ (package
+ (name "python-osqp")
+ (version "0.6.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/osqp/osqp-python")
+ (commit (string-append "v" version))
+ (recursive? #true)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0s1nbzkfsi2h4ji3v0k14pfcrvinakrwy4xdbz320lbaq3yb0b65"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ ;; Some of these test failures are explained by
+ ;; https://github.com/osqp/osqp-python/issues/121.
+ ;; These tests require the module "vec_emosqp", which we don't have.
+ '(list "--ignore=src/osqp/tests/codegen_vectors_test.py"
+ ;; These tests need "mat_emosqp".
+ "--ignore=src/osqp/tests/codegen_matrices_test.py"
+ ;; These fail with accuracy differences
+ "--ignore=src/osqp/tests/update_matrices_test.py"
+ "--ignore=src/osqp/tests/feasibility_test.py"
+ "--ignore=src/osqp/tests/polishing_test.py"
+ ;; This requires the nonfree MKL.
+ "--ignore=src/osqp/tests/mkl_pardiso_test.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; It looks like the upgrade to scipy 1.12.0 only broke the test
+ ;; suite, not the features of this library. See
+ ;; https://github.com/osqp/osqp-python/issues/121.
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "requirements.txt"
+ (("scipy.*1.12.0") "scipy <= 1.12.0"))))
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
+ (propagated-inputs (list python-numpy python-qdldl python-scipy))
+ ;; We need setuptools-scm only for the version number. Without it the
+ ;; version number will be "0.0.0" and downstream packages will complain.
+ (native-inputs (list cmake-minimal python-pytest python-setuptools-scm))
+ (home-page "https://osqp.org/")
+ (synopsis "OSQP: operator splitting QP solver")
+ (description "The OSQP (Operator Splitting Quadratic Program) solver is a
+numerical optimization package.")
+ (license license:asl2.0)))
+
(define-public python-qdldl
(package
(name "python-qdldl")
- 18/64: gnu: Add python-qdldl., (continued)
- 18/64: gnu: Add python-qdldl., guix-commits, 2024/05/02
- 20/64: gnu: Add python-ecos., guix-commits, 2024/05/02
- 26/64: gnu: python-xarray: Disable tests that are known to fail., guix-commits, 2024/05/02
- 31/64: gnu: python-scikit-learn: Update to 1.4.2., guix-commits, 2024/05/02
- 30/64: gnu: python-cython-3: Update to 3.0.8., guix-commits, 2024/05/02
- 35/64: gnu: Add apache-orc., guix-commits, 2024/05/02
- 11/64: gnu: Add python-colorcet., guix-commits, 2024/05/02
- 13/64: gnu: Add python-param., guix-commits, 2024/05/02
- 15/64: gnu: Add python-clarabel., guix-commits, 2024/05/02
- 16/64: gnu: Add python-fastcluster., guix-commits, 2024/05/02
- 19/64: gnu: Add python-osqp.,
guix-commits <=
- 23/64: gnu: python-plastid: Replace nose with pytest., guix-commits, 2024/05/02
- 21/64: gnu: Add python-cvxpy., guix-commits, 2024/05/02
- 22/64: gnu: Add python-metacells., guix-commits, 2024/05/02
- 24/64: gnu: python-scikit-opt: Add missing input., guix-commits, 2024/05/02
- 28/64: gnu: tadbit: Use G-expression., guix-commits, 2024/05/02
- 33/64: gnu: python-tabulate: Update to 0.9.0., guix-commits, 2024/05/02
- 17/64: gnu: Add python-scs., guix-commits, 2024/05/02
- 27/64: gnu: r-reticulate: Update to 1.36.1., guix-commits, 2024/05/02
- 29/64: gnu: python-pyjanitor: Update to 0.27.0., guix-commits, 2024/05/02
- 32/64: gnu: python-pandas-2: Fix version., guix-commits, 2024/05/02