[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/93: gnu: Add python-osqp.
From: |
guix-commits |
Subject: |
19/93: gnu: Add python-osqp. |
Date: |
Sun, 5 May 2024 16:44:49 -0400 (EDT) |
rekado pushed a commit to branch wip-python-team
in repository guix.
commit a0971243bce66ee738be8cbca3c8e023b6ff68e0
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")
- 21/93: gnu: Add python-cvxpy., (continued)
- 21/93: gnu: Add python-cvxpy., guix-commits, 2024/05/05
- 64/93: gnu: tadbit: Add R to inputs., guix-commits, 2024/05/05
- 68/93: gnu: snakemake-7: Make compatible with tabulate 0.9.0., guix-commits, 2024/05/05
- 83/93: gnu: python-cooltools: Update to 0.7.0., guix-commits, 2024/05/05
- 92/93: gnu: python-gpy: Update to 1.13.1., guix-commits, 2024/05/05
- 17/93: gnu: Add python-scs., guix-commits, 2024/05/05
- 51/93: gnu: python-tabulate: Enable tests and fix version string., guix-commits, 2024/05/05
- 75/93: gnu: python-pytest-shutil: Disable a test., guix-commits, 2024/05/05
- 22/93: gnu: Add python-metacells., guix-commits, 2024/05/05
- 65/93: gnu: python-imbalanced-learn: Update to 0.12.2., guix-commits, 2024/05/05
- 19/93: gnu: Add python-osqp.,
guix-commits <=
- 24/93: gnu: python-scikit-opt: Add missing input., guix-commits, 2024/05/05
- 31/93: gnu: python-scikit-learn: Update to 1.4.2., guix-commits, 2024/05/05
- 38/93: gnu: python-tables: Update to 3.7.0., guix-commits, 2024/05/05
- 41/93: gnu: Add python-dask-expr., guix-commits, 2024/05/05
- 52/93: gnu: python-numpy: Update to 1.26.0., guix-commits, 2024/05/05
- 59/93: gnu: python-dask: Disable some tests., guix-commits, 2024/05/05
- 60/93: gnu: python-dask: Do not reference pyarrow_hotfix., guix-commits, 2024/05/05
- 63/93: gnu: tadbit: Patch for compatibility with latest scipy., guix-commits, 2024/05/05
- 66/93: gnu: python-jsonpickle: Update to 3.0.4., guix-commits, 2024/05/05
- 67/93: gnu: snakemake-6: Make compatible with tabulate 0.9.0., guix-commits, 2024/05/05