mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 03:43:45 +00:00
Merge pull request #286237 from a-n-n-a-l-e-e/scipy-1.12-osqp-unittests
python311Packages.{osqp,cvxpy,jaxopt,qutip}: scipy 1.12 fixes
This commit is contained in:
commit
77d6035473
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchpatch
|
||||
, clarabel
|
||||
, cvxopt
|
||||
, ecos
|
||||
@ -29,6 +30,16 @@ buildPythonPackage rec {
|
||||
hash = "sha256-CjhqV4jb14t7IN0HFSTsY2yPpys2KOafGrxxTI+YEeU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix QP tests. remove on next update
|
||||
# https://github.com/cvxpy/cvxpy/pull/2343
|
||||
(fetchpatch {
|
||||
name = "fix-QP-tests.patch";
|
||||
url = "https://github.com/cvxpy/cvxpy/commit/4c8549b9820e64c1b06f5d71c5d3f36528dd4a76.patch";
|
||||
hash = "sha256-43zjS1STEBaGgj1jEOlX3XzMsE4wjoKAk8ApJo98AzY=";
|
||||
})
|
||||
];
|
||||
|
||||
# we need to patch out numpy version caps from upstream
|
||||
postPatch = ''
|
||||
sed -i 's/\(numpy>=[0-9.]*\),<[0-9.]*;/\1;/g' pyproject.toml
|
||||
|
@ -1,7 +1,9 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pytest-xdist
|
||||
, pytestCheckHook
|
||||
, absl-py
|
||||
@ -29,6 +31,16 @@ buildPythonPackage rec {
|
||||
hash = "sha256-T/BHSnuk3IRuLkBj3Hvb/tFIb7Au25jjQtvwL28OU1U=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix failing tests from scipy 1.12 update
|
||||
# https://github.com/google/jaxopt/pull/574
|
||||
(fetchpatch {
|
||||
name = "scipy-1.12-fix-tests.patch";
|
||||
url = "https://github.com/google/jaxopt/commit/48b09dc4cc93b6bc7e6764ed5d333f9b57f3493b.patch";
|
||||
hash = "sha256-v+617W7AhxA1Dzz+DBtljA4HHl89bRTuGi1QfatobNY=";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
absl-py
|
||||
jax
|
||||
@ -54,6 +66,13 @@ buildPythonPackage rec {
|
||||
"jaxopt.tree_util"
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
# https://github.com/google/jaxopt/issues/577
|
||||
"test_binary_logit_log_likelihood"
|
||||
"test_solve_sparse"
|
||||
"test_logreg_with_intercept_manual_loop3"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://jaxopt.github.io";
|
||||
description = "Hardware accelerated, batchable and differentiable optimizers in JAX";
|
||||
|
@ -5,6 +5,7 @@
|
||||
, fetchPypi
|
||||
, future
|
||||
, numpy
|
||||
, oldest-supported-numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, qdldl
|
||||
@ -15,7 +16,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "osqp";
|
||||
version = "0.6.3";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@ -28,6 +29,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
oldest-supported-numpy
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
@ -50,6 +52,14 @@ buildPythonPackage rec {
|
||||
disabledTests = [
|
||||
# Need an unfree license package - mkl
|
||||
"test_issue14"
|
||||
]
|
||||
# disable tests failing after scipy 1.12 update
|
||||
# https://github.com/osqp/osqp-python/issues/121
|
||||
# re-enable once unit tests fixed
|
||||
++ [
|
||||
"feasibility_tests"
|
||||
"polish_tests"
|
||||
"update_matrices_tests"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qutip";
|
||||
version = "4.7.4";
|
||||
version = "4.7.5";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-gfWYlQoGESE+EryLVfsnmBq9xFf3d92xOmEz4A32iqU=";
|
||||
hash = "sha256-4nXZPZFu9L+Okha3qvPil1KvLGO1EbrzotQjqQ8r9l8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
Loading…
Reference in New Issue
Block a user