From 6ab787a916cafaf391b0da07024c3927ca199924 Mon Sep 17 00:00:00 2001 From: Alexander Kiselyov Date: Sun, 25 Aug 2024 11:23:05 +0000 Subject: [PATCH] python3Packages.pymanopt: 2.2.0 -> 2.2.0-unstable-2024-07-10 (#336807) --- .../python-modules/pymanopt/default.nix | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pymanopt/default.nix b/pkgs/development/python-modules/pymanopt/default.nix index 019d107e2342..0172ecc6540d 100644 --- a/pkgs/development/python-modules/pymanopt/default.nix +++ b/pkgs/development/python-modules/pymanopt/default.nix @@ -8,21 +8,31 @@ autograd, matplotlib, pytestCheckHook, + setuptools-scm, }: buildPythonPackage rec { pname = "pymanopt"; - version = "2.2.0"; - format = "setuptools"; + version = "2.2.0-unstable-2024-07-10"; + pyproject = true; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = "2.2.0"; src = fetchFromGitHub { owner = pname; repo = pname; - rev = "refs/tags/${version}"; - hash = "sha256-pDFRYhswcuAHG9pcqvzXIy3Ivhxe5R5Ric7AFRh7MK4="; + rev = "1de3b6f47258820fdc072fceaeaa763b9fd263b0"; + hash = "sha256-j/fVeMgoLLBgRYFtSj2ZyNJb8iuWlnn2/YpBqUoCAFk="; }; - propagatedBuildInputs = [ + preConfigure = '' + substituteInPlace pyproject.toml --replace-fail "\"pip==22.3.1\"," "" + ''; + + build-system = [ + setuptools-scm + ]; + dependencies = [ numpy scipy torch @@ -35,14 +45,15 @@ buildPythonPackage rec { preCheck = '' substituteInPlace "tests/conftest.py" \ - --replace "import tensorflow as tf" "" + --replace-fail "import tensorflow as tf" "" substituteInPlace "tests/conftest.py" \ - --replace "tf.random.set_seed(seed)" "" + --replace-fail "tf.random.set_seed(seed)" "" ''; disabledTestPaths = [ "tests/test_examples.py" "tests/backends/test_tensorflow.py" + "tests/backends/test_jax.py" "tests/test_problem.py" ]; @@ -53,6 +64,5 @@ buildPythonPackage rec { homepage = "https://www.pymanopt.org/"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ yl3dy ]; - broken = lib.versionAtLeast scipy.version "1.10.0"; }; }