Commit c25639f6 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files
parent 95edbad1
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -26,25 +26,18 @@
  cvxpy,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "qutip";
  version = "5.2.2";
  version = "5.2.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "qutip";
    repo = "qutip";
    tag = "v${version}";
    hash = "sha256-Av6OVw3dwZUA13W+5kJ2EwGzIMhNn9lZwEsk5EKTbyk=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-y3yQf6rCjK0342WnUBieBmCLOWXjBAkxPe+G7TzZKio=";
  };

  postPatch =
    # build-time constraint, used to ensure forward and backward compat
    ''
      substituteInPlace pyproject.toml setup.cfg \
        --replace-fail "numpy>=2.0.0" "numpy"
    '';

  build-system = [
    cython
    oldest-supported-numpy
@@ -62,7 +55,7 @@ buildPythonPackage rec {
    pytest-rerunfailures
    writableTmpDirAsHomeHook
  ]
  ++ lib.concatAttrValues optional-dependencies;
  ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;

  # QuTiP tries to access the home directory to create an rc file for us.
  # We need to go to another directory to run the tests from there.
@@ -94,7 +87,7 @@ buildPythonPackage rec {
  meta = {
    description = "Open-source software for simulating the dynamics of closed and open quantum systems";
    homepage = "https://qutip.org/";
    changelog = "https://github.com/qutip/qutip/releases/tag/${src.tag}";
    changelog = "https://github.com/qutip/qutip/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.bsd3;
    maintainers = [ ];
    badPlatforms = [
@@ -107,4 +100,4 @@ buildPythonPackage rec {
      "aarch64-linux"
    ];
  };
}
})