Commit 36e386de authored by qbisi's avatar qbisi
Browse files

python312Packages.pyadjoint-ad: init at 2025.04.0

parent fb44ac97
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  scipy,
  checkpoint-schedules,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pyadjoint-ad";
  version = "2025.04.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dolfin-adjoint";
    repo = "pyadjoint";
    tag = version;
    hash = "sha256-ZNd8aJJ87OfQakScrkYqhCAh7qGctW/uqIoQjX5VEhI=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    scipy
    checkpoint-schedules
  ];

  pythonImportsCheck = [
    # The firedrake_adjoint module is deprecated and requires a cyclic dependency of firedrake
    # "firedrake_adjoint"
    "numpy_adjoint"
    "pyadjoint"
    "pyadjoint.optimization"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [
    "tests/pyadjoint"
  ];

  meta = {
    homepage = "https://github.com/dolfin-adjoint/pyadjoint";
    description = "High-level automatic differentiation library";
    license = lib.licenses.lgpl3Only;
    maintainers = with lib.maintainers; [ qbisi ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -11824,6 +11824,8 @@ self: super: with self; {
  pyacoustid = callPackage ../development/python-modules/pyacoustid { };
  pyadjoint-ad = callPackage ../development/python-modules/pyadjoint-ad { };
  pyads = callPackage ../development/python-modules/pyads { };
  pyaehw4a1 = callPackage ../development/python-modules/pyaehw4a1 { };